* postgresql client packaging recipe
@ 2021-12-10 21:41 Mortimer Cladwell
2021-12-10 23:21 ` Tobias Geerinckx-Rice
0 siblings, 1 reply; 4+ messages in thread
From: Mortimer Cladwell @ 2021-12-10 21:41 UTC (permalink / raw)
To: help-guix
Hi,
Postgresql-client is not available in the main repository (server is!). I
assumed it was due to the complicated license:
https://metadata.ftp-master.debian.org/changelogs//main/p/postgresql-13/postgresql-13_13.4-0+deb11u1_copyright
So I wrote a packaging recipe (below) and submitted to nonfree. Was told
it might be that no one has gotten around to packaging for main yet. I see
the documentation for submitting patches, but not recipe files. Is there a
protocol for submitting packaging recipes?
guix build succeeds:
...[many successes]...
phase `delete-info-dir-file' succeeded after 0.0 seconds
starting phase `patch-dot-desktop-files'
phase `patch-dot-desktop-files' succeeded after 0.0 seconds
starting phase `install-license-files'
installing 0 license files from '.'
phase `install-license-files' succeeded after 0.0 seconds
starting phase `reset-gzip-timestamps'
phase `reset-gzip-timestamps' succeeded after 0.0 seconds
starting phase `compress-documentation'
phase `compress-documentation' succeeded after 0.0 seconds
successfully built
/gnu/store/fqmsg116ycbxyvns6wd09cwk2a6nyqis-postgresql-client-13.4.drv
/gnu/store/w9gswswv5qxc84nyq5n7zkicygsb0rrq-postgresql-client-13.4
Tested and functional on Debian.
Thanks
Mortimer
----------------------------------------------------------------------------------------
(define-module (gnu packages postgresql-client)
#:use-module (guix packages)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix download)
#:use-module (guix build-system gnu)
#:use-module (gnu packages)
#:use-module (gnu packages autotools)
#:use-module (gnu packages guile)
#:use-module (gnu packages base)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages readline)
#:use-module (gnu packages texinfo))
(define-public postgresql-client
(package
(name "postgresql-client")
(version "13.4")
(source
(origin
(method url-fetch)
(uri "
http://deb.debian.org/debian/pool/main/p/postgresql-13/postgresql-13_13.4.orig.tar.bz2
")
(sha256
(base32 "1kf0gcsrl5n25rjlvkh87aywmn28kbwvakm5c7j1qpr4j01y34za"))))
(build-system gnu-build-system)
(arguments `())
(native-inputs
`(("autoconf" ,autoconf)
("automake" ,automake)
("pkg-config" ,pkg-config)
("texinfo" ,texinfo)))
(inputs `(("readline" ,readline)
("zlib" ,(@ (gnu packages compression) zlib))))
(propagated-inputs `())
(synopsis "Front-end programs for PostgreSQL 13")
(description "This package contains client and administrative programs
for PostgreSQL: these are the interactive terminal client psql and programs
for creating and removing users and databases.")
(home-page "https://www.postgresql.org/docs/13/reference-client.html")
(license license:gpl3+)))
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: postgresql client packaging recipe
2021-12-10 21:41 postgresql client packaging recipe Mortimer Cladwell
@ 2021-12-10 23:21 ` Tobias Geerinckx-Rice
2021-12-10 23:30 ` Tobias Geerinckx-Rice
0 siblings, 1 reply; 4+ messages in thread
From: Tobias Geerinckx-Rice @ 2021-12-10 23:21 UTC (permalink / raw)
To: Mortimer Cladwell; +Cc: help-guix
[-- Attachment #1: Type: text/plain, Size: 2243 bytes --]
Mortimer,
> So I wrote a packaging recipe (below) and submitted to nonfree.
> Was told
> it might be that no one has gotten around to packaging for main
> yet.
Just FYI, Guix doesn't have sections like Debian. There is only a
single guix git repository, containing all packages supported and
maintained by the Guix project.
Guix deals exclusively in Free software. Any third-party
repositories that don't follow the GNU Free Software Distribution
Guidelines are not affiliated with GNU or Guix, and we can't
provide support for them here.
I'm not aware of any licence issues with PostgreSQL, however, so
we cool.
> I see
> the documentation for submitting patches, but not recipe
> files. Is there a
> protocol for submitting packaging recipes?
There's no difference! :-) Guix packages (=‘recipes’) are added
to the repository as patches. That's it. Same as any other
addition or fix: packages are just code, after all.
To submit a package upstream to Guix, you'd check out the git
repository, add your package (‘recipe’) to a file that best suits
it (here: databases.scm), commit it and send a patch as described
in that section of the manual.
However…
> (description "This package contains client and administrative
> programs
> for PostgreSQL: these are the interactive terminal client psql
> and programs
> for creating and removing users and databases.")
…I'm a bit confused. What exactly is missing?
λ ls $(guix build postgresql)/*bin
clusterdb pg_config pg_test_fsync
createdb pg_controldata pg_test_timing
createuser pg_ctl pg_upgrade
dropdb pg_dump pg_verifybackup
dropuser pg_dumpall pg_waldump
ecpg pg_isready postgres
initdb pg_receivewal postmaster
oid2name pg_recvlogical psql
pg_archivecleanup pg_resetwal reindexdb
pg_basebackup pg_restore vacuumdb
pgbench pg_rewind vacuumlo
pg_checksums pg_standby
Sorry to be so dense. I do use PostgreSQL but only know the very
basics, I haven't even used or heard of most of those commands.
Kind regards,
T G-R
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 247 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: postgresql client packaging recipe
2021-12-10 23:21 ` Tobias Geerinckx-Rice
@ 2021-12-10 23:30 ` Tobias Geerinckx-Rice
2021-12-11 11:35 ` Mortimer Cladwell
0 siblings, 1 reply; 4+ messages in thread
From: Tobias Geerinckx-Rice @ 2021-12-10 23:30 UTC (permalink / raw)
Cc: Mortimer Cladwell, help-guix
[-- Attachment #1: Type: text/plain, Size: 647 bytes --]
Tobias Geerinckx-Rice 写道:
>> Is there a protocol for submitting packaging recipes?
>
> There's no difference! :-)
I might've been missing the spirit of the question here. Patches
are the norm because they are easiest to review and commit.
Stand-alone packages/recipes mean busywork for committers, who
will be less likely to commit your package, or like you.
But in practice, submitting your first package as stand-alone file
to guix-patches@ or help-guix@ with a descriptive title is
certainly not taboo. Someone will surely help you get both your
package and your git set-up up to snuff.
Kind regards,
T G-R
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 247 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: postgresql client packaging recipe
2021-12-10 23:30 ` Tobias Geerinckx-Rice
@ 2021-12-11 11:35 ` Mortimer Cladwell
0 siblings, 0 replies; 4+ messages in thread
From: Mortimer Cladwell @ 2021-12-11 11:35 UTC (permalink / raw)
To: Tobias Geerinckx-Rice; +Cc: help-guix
Thanks Tobias
You have updated my thinking about postgresql.
On Debian, apt-get install postgresql installs the postgres database/user
and starts the service. If you are distributing a client app (I am) and
you only want to provide the user with the psql executable (I do), then you
have the client install postgresql-client.
With guix, it looks like guix package -i postgresql does not by default
create a database/user and start the service, but does provide the psql
executable. Maybe I can provide the postgresql package without having to
worry about polluting the users desktop with db/user/service. That would
make postgresql-client redundant.
That is my current thinking. Correct me if I am wrong.
Thanks
Mortimer
On Fri, Dec 10, 2021 at 6:42 PM Tobias Geerinckx-Rice <me@tobias.gr> wrote:
> Tobias Geerinckx-Rice 写道:
> >> Is there a protocol for submitting packaging recipes?
> >
> > There's no difference! :-)
>
> I might've been missing the spirit of the question here. Patches
> are the norm because they are easiest to review and commit.
>
> Stand-alone packages/recipes mean busywork for committers, who
> will be less likely to commit your package, or like you.
>
> But in practice, submitting your first package as stand-alone file
> to guix-patches@ or help-guix@ with a descriptive title is
> certainly not taboo. Someone will surely help you get both your
> package and your git set-up up to snuff.
>
> Kind regards,
>
> T G-R
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-12-11 11:35 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-12-10 21:41 postgresql client packaging recipe Mortimer Cladwell
2021-12-10 23:21 ` Tobias Geerinckx-Rice
2021-12-10 23:30 ` Tobias Geerinckx-Rice
2021-12-11 11:35 ` Mortimer Cladwell
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.