all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "(" <paren@disroot.org>
To: "Gottfried" <gottfried@posteo.de>, <help-guix@gnu.org>
Subject: Re: new version of paps (printing package for emacs)
Date: Sun, 08 Jan 2023 11:35:51 +0000	[thread overview]
Message-ID: <CPMS0FXBAPQX.2785LRNX9XGQ8@guix-framework> (raw)
In-Reply-To: <74e0c548-da17-1d78-3905-ca7c72e2778c@posteo.de>

[-- Attachment #1: Type: text/plain, Size: 3744 bytes --]

On Sun Jan 8, 2023 at 11:02 AM GMT, Gottfried wrote:
> How can I update it myself?

Clone the source code:

  git clone https://git.sv.gnu.org/git/guix.git
  cd guix

Create a new branch to make your changes in:

  git branch wip-update-paps

Now you can either use a git "worktree" (a new directory for your branch) or the current
directory to edit the branch:

  git checkout wip-update-paps # to use the current directory
  git worktree add wip-update-paps # i prefer to use a new directory

If you choose to use a worktree, make sure to cd there:

  cd wip-update-paps

Build the source code, to make sure everything's working alright:

  ./bootstrap
  ./configure --localstatedir=/var
  make -j$(nproc) # using multiple jobs makes the build process *much* faster

Now figure out where the package is:

  guix show paps
  # ---8<---
  # location: gnu/packages/pdf.scm:1459:2
  # ---8<---

Open up that file:

  (define-public paps
    (package
      (name "paps")
      (version "0.7.1")
      (source
       (origin
         (method url-fetch)
         (uri (string-append "https://github.com/dov/paps/releases/download/v"
                             version "/paps-" version ".tar.gz"))
         (sha256
          (base32 "1z1w1fg2bvb8p92n1jlpqp3n9mq42szb2mqhh4xqmmnmfcdkpi9s"))))
      (build-system gnu-build-system)
      (inputs
       (list pango))
      (native-inputs
       (list intltool pkg-config))
      (home-page "https://github.com/dov/paps")
      (synopsis "Pango to PostScript converter")
      (description
       "Paps reads a UTF-8 encoded file and generates a PostScript language
rendering of the file through the Pango Cairo back end.")
      (license license:lgpl2.0+)))

Change the ``version'' number to the latest version:

      (version "(***VERSION***)")

Now, Guix verifies downloaded code using a hash to check whether it's been
corrupted or tampered with, so we need to change that too.  To get the new
hash, use ``guix download'':

  guix download https://github.com/dov/paps/releases/download/v(***VERSION***)/paps-(***VERSION***).tar.gz

This will print out a string that looks a bit like what's currently in the
(sha256 (base32 "...")).  Replace that string with the one from ``guix download''
to update the hash.

Now, rebuild:

  make -j$(nproc)

We can use ``./pre-inst-env'' to test out our changes:

  ./pre-inst-env guix build paps

It'll probably fail with the error you got before, so try adding the needed
autotools dependencies to native-inputs:

  (native-inputs
   (list autoconf automake intltool libtool m4 pkg-config))

If that doesn't work, try adding gnu-gettext, too:

  (native-inputs
   (list autoconf automake gnu-gettext intltool libtool m4 pkg-config))

Now build and test again:

  make -j$(nproc)
  ./pre-inst-env guix build paps

If it works, you can send it as a patch to the Guix mailing list.  Follow the
instructions on <https://git-send-email.io>'s first two pages to set up Git's
email features, but *don't do anything else from there*.

Now you need to commit your change:

  git commit

Your commit message should look something like this:

  gnu: paps: Update to (***VERSION***).

  * gnu/packages/pdf.scm (paps): Update to (***VERSION***).

This is the typical GNU commit message format, called ChangeLog.

Now use ``git send-email'' to send the patch to guix-patches (see
<https://guix.gnu.org/manual/devel/en/html_node/Sending-a-Patch-Series.html>
for more information):

  git send-email -1 --base=master --to=guix-patches@gnu.org

A patch email should appear on the Guix mailing list, ready to be applied
by the maintainers :)

    -- (

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

  reply	other threads:[~2023-01-08 11:36 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-08 10:15 new version of paps (printing package for emacs) Gottfried
2023-01-08 10:41 ` (
2023-01-08 10:42   ` (
2023-01-08 11:02     ` Gottfried
2023-01-08 11:35       ` ( [this message]
2023-01-08 10:59   ` Gottfried
2023-01-08 11:01     ` (
2023-01-08 11:07       ` Gottfried

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CPMS0FXBAPQX.2785LRNX9XGQ8@guix-framework \
    --to=paren@disroot.org \
    --cc=gottfried@posteo.de \
    --cc=help-guix@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.