Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 23 Sep 2020 15:53:01 +0200
From:      Baptiste Daroussin <bapt@FreeBSD.org>
To:        Matthias Andree <mandree@FreeBSD.org>
Cc:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   Re: svn commit: r549723 - head/sysutils/e2fsprogs
Message-ID:  <20200923135301.b4y7bcgyuawhvvy2@ivaldir.net>
In-Reply-To: <202009231244.08NCiHUQ090692@repo.freebsd.org>
References:  <202009231244.08NCiHUQ090692@repo.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help

--l4aj7xlworhkp6wn
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Wed, Sep 23, 2020 at 12:44:17PM +0000, Matthias Andree wrote:
> Author: mandree
> Date: Wed Sep 23 12:44:16 2020
> New Revision: 549723
> URL: https://svnweb.freebsd.org/changeset/ports/549723
>=20
> Log:
>   - make /sbin/e2fsck and /sbin/fsck_ext2fs visible in pkg catalog/"pkg w=
hich",
>     so that "pkg which /sbin/e2fsck" yields the proper result.
>  =20
>     * this entails symlinking from $PREFIX/sbin to /sbin, and the pkg-ins=
tall
>       script will attempt to replace the symlinks by hard links if possib=
le.
>       pkg 1.15.4 cannot deal with packaged hard links and will fail.
>  =20
>     * Note that it is unavoidable that these be in /sbin because /usr/loc=
al or
>       /usr may not be mounted and consequently ext2 file systems could not
>       be fsck-ed or mounted from /etc/fstab.
>  =20
>     There will be no port option to avoid /sbin installs for now. We have=
 too
>     many options already and the testing effort increases exponentially.
>  =20
>   - make sure pkg-message appears on both install and upgrade
>  =20
>   - clean up and document/comment pkg-install so that armchair experts
>     will not pester me with meaningless change requests
>  =20
>   - bugfix/change: logic of mke2fs.conf upgrade handling to present less =
work for
>     users on port/package upgrades
>  =20
>   - bump PORTREVISION
>  =20
>   PR:	249284 (related)
>=20
> Modified:
>   head/sysutils/e2fsprogs/Makefile
>   head/sysutils/e2fsprogs/pkg-install
>   head/sysutils/e2fsprogs/pkg-message
>   head/sysutils/e2fsprogs/pkg-plist
>=20
> Modified: head/sysutils/e2fsprogs/Makefile
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D
> --- head/sysutils/e2fsprogs/Makefile	Wed Sep 23 12:31:14 2020	(r549722)
> +++ head/sysutils/e2fsprogs/Makefile	Wed Sep 23 12:44:16 2020	(r549723)
> @@ -3,7 +3,7 @@
> =20
>  PORTNAME=3D	e2fsprogs
>  PORTVERSION=3D	1.45.6
> -PORTREVISION?=3D	3
> +PORTREVISION?=3D	4
>  CATEGORIES?=3D	sysutils
>  MASTER_SITES=3D	KERNEL_ORG/linux/kernel/people/tytso/${PORTNAME}/v${PORT=
VERSION}
> =20
> @@ -252,7 +252,8 @@ post-build:
>  		&& ${MAKE_CMD} e2fsck V=3D1 \
>  		LIBS=3D"-static-libgcc -lc -Bstatic ../lib/libsupport.a ../lib/libext2=
fs.a ../lib/libcom_err.a \
>  		${_staticlibs} /usr/lib/libexecinfo.a /usr/lib/libelf.a \
> -		${LOCALBASE}/lib/libblkid.a ${LOCALBASE}/lib/libuuid.a ${libintl} ../l=
ib/libe2p.a "
> +		${LOCALBASE}/lib/libblkid.a ${LOCALBASE}/lib/libuuid.a ${libintl} ../l=
ib/libe2p.a " \
> +		&& ${STRIP_CMD} e2fsck
>  # Regression check: avoid a port (not upstream!) regression from 1.40.5,
>  # check that e2fsck isn't dynalinked against anything but libc.so:
>  	@${ECHO_CMD} -n "=3D=3D=3D>  checking that e2fsck depends on no shared =
objects outside /lib: "
> @@ -292,7 +293,24 @@ post-build:
>  .endif
> =20
>  post-install:
> -	${INSTALL_PROGRAM} ${WRKSRC}/fsck_ext2fs ${STAGEDIR}${PREFIX}/sbin/
> +	# pkg workaround time again;

This is not a workaround at all, can you please refrain saying those nasty
comments and even more commiting them! see below

> +	# the whole purpose of this dance is to move the necessities for
> +	# /etc/fstab fsck'ing into /sbin, and symlink to these guys
> +	# in the regular hierarchy, normally $PREFIX/sbin. Hard links may
> +	# crash the install if /usr[/local] is a separate file system from /,
> +	# and pkg 1.15.4 can't automatically unroll or install relative symlink=
s.

There is no reason why pkg should handle such thing. pkg is supposed to pro=
vide
always the same setup experience for everyone, so it will not try to create=
 a
link and if it fails copy the file.

pkg is supposed to track all files it installs, with special cases for
configuration files (@sample) no try to do a weird dance.

> +	${MKDIR} ${STAGEDIR}/sbin
> +	${MV} -f ${STAGEDIR}${PREFIX}/sbin/e2fsck ${STAGEDIR}/sbin/ # from INST=
ALL_TARGET
> +	${INSTALL_PROGRAM} ${WRKSRC}/fsck_ext2fs ${STAGEDIR}/sbin/  # from port
> +	# according to TPH 6.1.1 Handling Symbolic Links, these are to be absol=
ute,
> +	# yet stage-qa warns about these on 2020-09-16:
> +	${LN} -fs /sbin/fsck_ext2fs ${STAGEDIR}${PREFIX}/sbin/
> +	${LN} -fs /sbin/e2fsck      ${STAGEDIR}${PREFIX}/sbin/

And so instead of helping the framework to improve by providing a patch to
stage-qa, or even trying to understand the logic behind those rules you fin=
d it
better to hard code a comment which complains about it.

Bapt

--l4aj7xlworhkp6wn
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQIzBAABCAAdFiEEgOTj3suS2urGXVU3Y4mL3PG3PloFAl9rUzsACgkQY4mL3PG3
Plpz4g//a8Tedwnn180lnUKub94Ff9c8+vEZuAFcJe27BehHqH/ZL6CgtzwmQvS4
zKYFwUuBK+/CGMuXo7ZJajMpo6SycoMZIVQesDYjJMjNE8LBpVWL8liUVOi0YLB9
Xd570114yNXb3aJ3815r31s9Wjcs8xDszqMv90E46ayYGTJG/wIG0Pdxnf8d/uH4
VzHf+wagmhgO8kRfP/uUDXuhTy+oMM3JDy7pYazIYpK0q/NTTtZDruLUEujcKu2y
ewSYjcV4dvkw7iEznS0r6tchSU3cEwJakyamCy/XNgdwzM9Tjf1WFrt7b4+WtOkW
AJDexFX8JTgGYYwTELvuiWrHOVVU2eW7PctElXK+BMe9EZXR0+WBE9Y9ecSGAKJA
I62h7PptPvXqteSMG2hV6cCSEX87+Z1qYukJGRQUxuRwG4W8j2LUcWMgK5QEkSLF
tv3E8osIDLhd9eWEuQf6/hEaObAtZOS9BQ0glKVL04y+1JWFK2rKJQ7Wjw2LB+lS
w/p9sLjCFPPa5W8llxVSKxMoXzVfufnUhha+qT0UxQIMTRqEJPAPXqvwl/oZyXwW
iQtNEK1MBeVzxNmUfJU7W3FcNLsdQD5b7N91TsCz2ECUBGefadV+w4CO3DYaeZEF
M+P2TaEjaaAJ5/fdx+d8Xbp7M8vefXvbEM6PuOfXLgeFWtvfQpA=
=m87K
-----END PGP SIGNATURE-----

--l4aj7xlworhkp6wn--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20200923135301.b4y7bcgyuawhvvy2>