Discussion:
[aur-general] PKGBUILD git remote branch issue
Ralf Mardorf
2018-11-07 13:17:23 UTC
Permalink
Hi,

building the Claws GTK3 port works, if I build from the branch like
this:


[***@archlinux tmp]$ git clone git://git.claws-mail.org/claws.git
[snip]
[***@archlinux tmp]$ cd claws
[***@archlinux claws]$ git fetch origin
[***@archlinux claws]$ git branch --track gtk3 origin/gtk3
Branch 'gtk3' set up to track remote branch 'gtk3' from 'origin'.
[***@archlinux claws]$ ./autogen.sh
[snip]
[***@archlinux claws]$ ./configure --build=$HOSTTYPE-arch-linux-gnu --prefix=/usr --disable-static --enable-enchant --enable-gnutls --enable-ldap --enable-crash-dialog --enable-pgpmime-plugin --enable-spamassassin-plugin --enable-bogofilter-plugin
[***@archlinux claws]$ sh version
3.17.0-153-gf4607b
[***@archlinux claws]$ make
[snip]
Done.
[snip]



If I try to build from the master with "--enable-gtk3" it fails, see:
https://lists.claws-mail.org/pipermail/users/2018-November/023174.html

A developer mentions that I should build from the gtk3 branch:
https://lists.claws-mail.org/pipermail/users/2018-November/023176.html

I commented out "#--enable-gtk3"...



[***@archlinux claws]$ grep HOST /usr/src/claws-mail-gtk3-git/PKGBUILD -B1 -A14
./configure \
--build=$HOSTTYPE-arch-linux-gnu \
--prefix=/usr \
--disable-jpilot \
--disable-maintainer-mode \
--disable-manual \
--disable-static \
--enable-bogofilter-plugin \
--enable-crash-dialog \
--enable-enchant \
--enable-gnutls \
#--enable-gtk3 \
--enable-ldap \
--enable-pgpmime-plugin \
--enable-silent-rules \
--enable-spamassassin-plugin



...but don't know what "foo bar" to add to the source or how else to
handle this by a PKGBUILD:

[***@archlinux claws]$ grep source /usr/src/claws-mail-gtk3-git/PKGBUILD
source=('claws-mail::git://git.claws-mail.org/#FOO=BAR')



Is there an easy way to do it?

Regards,
Ralf
s***@t-online.de
2018-11-07 13:27:12 UTC
Permalink
Post by Ralf Mardorf
Is there an easy way to do it?
Regards,
Ralf
source=('claws-mail::git://git.claws-mail.org/#branch=gtk3')
Ralf Mardorf
2018-11-07 14:16:22 UTC
Permalink
Post by s***@t-online.de
source=('claws-mail::git://git.claws-mail.org/#branch=gtk3')
Thank you,

unfortunately I tried already with

source=('claws-mail::git://git.claws-mail.org/claws.git#branch=gtk3')
^^^^^^^^^
My bad, I didn't notice
that I deleted "claws.git", when I added already "#branch=gtk3" before.

However, this way it tries to build 3.16.0.r463.g04185a6e4-1, let alone
that it fails with ^^^^^^

"Configure finished, type 'make' to build.
/usr/src/claws-mail-gtk3-git/PKGBUILD: line 85: --enable-ldap: command
not found
==> ERROR: A failure occurred in build().
Aborting..."

Without a PKGBUILD it does build 3.17.0-153-gf4607b with all the
^^^^^^
configure options used by the PKGBUILD.

./configure --build=$HOSTTYPE-arch-linux-gnu --prefix=/usr --disable-jpilot --disable-maintainer-mode --disable-manual --disable-static --enable-bogofilter-plugin --enable-crash-dialog --enable-enchant --enable-gnutls --enable-pgpmime-plugin --enable-silent-rules --enable-spamassassin-plugin --enable-ldap
^^^^^^^^^^^^^

IOW this way, the PKGBUILD doesn't get the correct version of the GTK3 branch.

Regards,
Ralf
Doug Newgard via aur-general
2018-11-07 14:40:39 UTC
Permalink
On Wed, 07 Nov 2018 15:16:22 +0100
Post by Ralf Mardorf
"Configure finished, type 'make' to build.
/usr/src/claws-mail-gtk3-git/PKGBUILD: line 85: --enable-ldap: command
not found
==> ERROR: A failure occurred in build().
Aborting..."
That error is a mistake in the PKGBUILD, nothing to do with the checkout.
Ralf Mardorf
2018-11-07 14:47:59 UTC
Permalink
Post by Doug Newgard via aur-general
On Wed, 07 Nov 2018 15:16:22 +0100
Post by Ralf Mardorf
"Configure finished, type 'make' to build.
/usr/src/claws-mail-gtk3-git/PKGBUILD: line 85: --enable-ldap: command
not found
==> ERROR: A failure occurred in build().
Aborting..."
That error is a mistake in the PKGBUILD, nothing to do with the checkout.
The PKGBUILD tries to build an outdated release, that is why it fails.
When building the latest release, it works with "--enable-ldap".
Robin Broda via aur-general
2018-11-07 14:49:10 UTC
Permalink
Post by Ralf Mardorf
Post by Doug Newgard via aur-general
On Wed, 07 Nov 2018 15:16:22 +0100
Post by Ralf Mardorf
"Configure finished, type 'make' to build.
/usr/src/claws-mail-gtk3-git/PKGBUILD: line 85: --enable-ldap: command
not found
==> ERROR: A failure occurred in build().
Aborting..."
That error is a mistake in the PKGBUILD, nothing to do with the checkout.
The PKGBUILD tries to build an outdated release, that is why it fails.
When building the latest release, it works with "--enable-ldap".
No, it doesn't work because you're breaking your multiline command
with the comment line inbetween.
--
Rob (coderobe)

O< ascii ribbon campaign - stop html mail - www.asciiribbon.org
Ralf Mardorf
2018-11-07 14:55:08 UTC
Permalink
Post by Robin Broda via aur-general
No, it doesn't work because you're breaking your multiline command
with the comment line inbetween.
Good point :D!
Ralf Mardorf
2018-11-07 15:12:15 UTC
Permalink
Post by Ralf Mardorf
Post by Robin Broda via aur-general
No, it doesn't work because you're breaking your multiline command
with the comment line inbetween.
Good point :D!
I must be missing something else.

[***@archlinux claws-mail-gtk3-git]$ grep HOST /usr/src/claws-mail-gtk3-git/PKGBUILD -B1 -A14
./configure \
--build=$HOSTTYPE-arch-linux-gnu \
--prefix=/usr \
--disable-jpilot \
--disable-maintainer-mode \
--disable-manual \
--disable-static \
--enable-bogofilter-plugin \
--enable-crash-dialog \
--enable-enchant \
--enable-gnutls \
--enable-ldap \
--enable-pgpmime-plugin \
--enable-silent-rules \
--enable-spamassassin-plugin
#--enable-gtk3 \
[***@archlinux claws-mail-gtk3-git]$ makepkg -s
==> Making package: claws-mail-gtk3-git 3.17.0-1 (Wed 07 Nov 2018 03:57:57 PM CET)
==> Starting prepare()...
==> Starting pkgver()...
==> Updated version: claws-mail-gtk3-git 3.16.0.r463.g04185a6e4-1
==> Starting build()...




Now it builds, but seemingly the wrong version.




make: *** [Makefile:558: all] Interrupt

==> ERROR: Aborted by user! Exiting...

[***@archlinux claws-mail-gtk3-git]$ cd claws-mail/
[***@archlinux claws-mail]$ git describe --abbrev=0 --tags
3.17.0
[***@archlinux claws-mail]$ git rev-parse --short HEAD
f4607b4b6
[***@archlinux claws-mail]$ cd ..
[***@archlinux claws-mail-gtk3-git]$ sudo rm -Ir claws-mail/ pkg/ src/
[sudo] password for rocketmouse:
rm: remove 3 arguments recursively? y
[***@archlinux claws-mail-gtk3-git]$ ls
PKGBUILD
[***@archlinux claws-mail-gtk3-git]$ makepkg -s
[snip]
config.status: creating po/Makefile

claws-mail 3.16.0git463

Using Address Book : Original stable interface
JPilot : no
LDAP : yes
gnuTLS : yes
iconv : yes
compface : yes
IPv6 : yes
enchant : yes
IMAP4 : yes
NNTP : yes
Crash dialog : yes
LibSM : yes
DBUS : yes
NetworkManager : yes
Manual : no
Generic UMPC code : no
SVG support : yes
Config dir : .claws-mail
Password crypto : gnutls
Unit tests : no
[snip]
==> Finished making: claws-mail-gtk3-git 3.16.0.r463.g04185a6e4-1 (Wed 07 Nov 2018 04:07:39 PM CET)
Doug Newgard via aur-general
2018-11-07 14:50:29 UTC
Permalink
On Wed, 07 Nov 2018 15:47:59 +0100
Post by Ralf Mardorf
Post by Doug Newgard via aur-general
On Wed, 07 Nov 2018 15:16:22 +0100
Post by Ralf Mardorf
"Configure finished, type 'make' to build.
/usr/src/claws-mail-gtk3-git/PKGBUILD: line 85: --enable-ldap: command
not found
==> ERROR: A failure occurred in build().
Aborting..."
That error is a mistake in the PKGBUILD, nothing to do with the checkout.
The PKGBUILD tries to build an outdated release, that is why it fails.
When building the latest release, it works with "--enable-ldap".
No, it fails because you have a return before --enable-ldap
Eli Schwartz via aur-general
2018-11-07 15:08:07 UTC
Permalink
Post by Ralf Mardorf
However, this way it tries to build 3.16.0.r463.g04185a6e4-1, let alone
that it fails with ^^^^^^
"Configure finished, type 'make' to build.
/usr/src/claws-mail-gtk3-git/PKGBUILD: line 85: --enable-ldap: command
not found
==> ERROR: A failure occurred in build().
Aborting..."
Failure is unrelated and comes from bash attempting to run the line:
"--enable-ldap" as a command instead of an option to the configure
command. Please don't confused errors running the build() function, for
errors checking out the sources.
Post by Ralf Mardorf
Without a PKGBUILD it does build 3.17.0-153-gf4607b with all the
^^^^^^
configure options used by the PKGBUILD.
./configure --build=$HOSTTYPE-arch-linux-gnu --prefix=/usr --disable-jpilot --disable-maintainer-mode --disable-manual --disable-static --enable-bogofilter-plugin --enable-crash-dialog --enable-enchant --enable-gnutls --enable-pgpmime-plugin --enable-silent-rules --enable-spamassassin-plugin --enable-ldap
^^^^^^^^^^^^^
IOW this way, the PKGBUILD doesn't get the correct version of the GTK3 branch.
But the PKGBUILD is at least getting the correct version of the gtk3
branch, unlike you --- in other words, the #branch=gtk3 notation is
designed to accurately do exactly "what it says on the label", whereas
humans are error-prone and sometimes forget to switch from the master
branch to the gtk3 branch.
--
Eli Schwartz
Bug Wrangler and Trusted User
Ralf Mardorf
2018-11-07 15:32:54 UTC
Permalink
Post by Eli Schwartz via aur-general
But the PKGBUILD is at least getting the correct version of the gtk3
branch, unlike you --- in other words, the #branch=gtk3 notation is
designed to accurately do exactly "what it says on the label", whereas
humans are error-prone and sometimes forget to switch from the master
branch to the gtk3 branch.
Thank you,

so I made two mistakes. I forgot to switch and assumed that development
of the gtk3 port is in sync with the gtk2 version of Claws.

[***@archlinux ~]$ cd /tmp/claws
[***@archlinux claws]$ git describe --abbrev=0 --tags
3.17.0
[***@archlinux claws]$ git rev-parse --short HEAD
f4607b4b6
[***@archlinux claws]$ git checkout gtk3
Switched to branch 'gtk3'
Your branch is up to date with 'origin/gtk3'.
[***@archlinux claws]$ git describe --abbrev=0 --tags
3.16.0
[***@archlinux claws]$ git rev-parse --short HEAD
04185a6e4

Regards,
Ralf
Ralf Mardorf
2018-11-07 19:23:02 UTC
Permalink
Hi,

some information regarding the release:
https://lists.claws-mail.org/pipermail/users/2018-November/023180.html

FWIW the PKGBUILD:

https://lists.claws-mail.org/pipermail/users/attachments/20181107/1525d5fe/attachment-0003.obj

It's more or less copied from
https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=claws-mail-git.

Regards,
Ralf

Eli Schwartz via aur-general
2018-11-07 13:38:55 UTC
Permalink
Post by Ralf Mardorf
Hi,
building the Claws GTK3 port works, if I build from the branch like
[snip]
Branch 'gtk3' set up to track remote branch 'gtk3' from 'origin'.
More convenient to use the following:

git clone --branch=gtk3 git://git.claws-mail.org/claws.git
Post by Ralf Mardorf
https://lists.claws-mail.org/pipermail/users/2018-November/023176.html
...but don't know what "foo bar" to add to the source or how else to
source=('claws-mail::git://git.claws-mail.org/#FOO=BAR')
Is there an easy way to do it?
As per the PKGBUILD(5) man page, use:

source=("git://example.com/reponame.git#FOO=BAR")

where FOO is either:
- tag
- branch
- commit

and BAR is the corresponding revision you wish to check out (in this
case the branch name is "gtk3")

So, #FOO=BAR would be #branch=gtk3
--
Eli Schwartz
Bug Wrangler and Trusted User
Ralf Mardorf
2018-11-07 14:38:25 UTC
Permalink
Post by Eli Schwartz via aur-general
source=("git://example.com/reponame.git#FOO=BAR")
- tag
- branch
- commit
and BAR is the corresponding revision you wish to check out (in this
case the branch name is "gtk3")
So, #FOO=BAR would be #branch=gtk3
Thank you,

unfortunately it doesn't work.

[***@archlinux claws-mail-gtk3-git]$ ls
PKGBUILD
[***@archlinux claws-mail-gtk3-git]$ makepkg -s
==> Making package: claws-mail-gtk3-git 3.17.0-1 (Wed 07 Nov 2018 03:27:22 PM CET)
[snip]
==> Starting prepare()...
==> Starting pkgver()...
==> Updated version: claws-mail-gtk3-git 3.16.0.r463.g04185a6e4-1
==> Starting build()...
^C

[***@archlinux tmp]$ git clone git://git.claws-mail.org/claws.git
[snip]
[***@archlinux tmp]$ cd claws/
[***@archlinux claws]$ git fetch origin
[***@archlinux claws]$ git branch --track gtk3 origin/gtk3
Branch 'gtk3' set up to track remote branch 'gtk3' from 'origin'.
[***@archlinux claws]$ ./autogen.sh
[snip]
claws-mail 3.17.0git153
[snip]

Regards,
Ralf
Eli Schwartz via aur-general
2018-11-07 14:57:42 UTC
Permalink
Post by Ralf Mardorf
Post by Eli Schwartz via aur-general
source=("git://example.com/reponame.git#FOO=BAR")
- tag
- branch
- commit
and BAR is the corresponding revision you wish to check out (in this
case the branch name is "gtk3")
So, #FOO=BAR would be #branch=gtk3
Thank you,
unfortunately it doesn't work.
PKGBUILD
==> Making package: claws-mail-gtk3-git 3.17.0-1 (Wed 07 Nov 2018 03:27:22 PM CET)
[snip]
==> Starting prepare()...
==> Starting pkgver()...
==> Updated version: claws-mail-gtk3-git 3.16.0.r463.g04185a6e4-1
==> Starting build()...
^C
[snip]
Branch 'gtk3' set up to track remote branch 'gtk3' from 'origin'.
[snip]
claws-mail 3.17.0git153
[snip]
That output is entirely correct.

When you use my command, you checkout "gtk3" during the clone.

When you use your command, you create a gtk3 branch that you never use,
because you stayed on master. If you'd switched to the gtk3 branch you
created, using "git checkout gtk3", you'd see that it tells you
"Switched to branch 'gtk3'"

...

This is why I recommended you use a proper git clone in the first place.

...

Other fun tricks:

$ git clone git://git.claws-mail.org/claws.git
Cloning into 'claws'...
[...]
$ git checkout gtk3
Branch 'gtk3' set up to track remote branch 'gtk3' from 'origin'.
Switched to a new branch 'gtk3'


No need to do crazy stuff with manual branching either -- git is super
smart and knows what you mean. It also tells you when it's doing it, so
you can verify that it happened.
--
Eli Schwartz
Bug Wrangler and Trusted User
Loading...