svn commit: r500363 - in head/sysutils: . etc_os-release
Po-Chuan Hsieh
sunpoet at freebsd.org
Tue Apr 30 00:24:30 UTC 2019
On Mon, Apr 29, 2019 at 3:22 AM Tobias C. Berner <tcberner at freebsd.org>
wrote:
> Author: tcberner
> Date: Sun Apr 28 19:22:21 2019
> New Revision: 500363
> URL: https://svnweb.freebsd.org/changeset/ports/500363
>
> Log:
> New port: sysutils/etc_os-release
>
> Modern Linux systems provide /etc/os-release containing information
> about the installed operating system. For example Qt reads said file
> to get that information.
>
> For more information on the file, see:
> https://www.freedesktop.org/software/systemd/man/os-release.html
>
> Reviewed by: adridg, danfe, kwm
> Differential Revision: https://reviews.freebsd.org/D19866
>
> Added:
> head/sysutils/etc_os-release/
> head/sysutils/etc_os-release/Makefile (contents, props changed)
> head/sysutils/etc_os-release/pkg-descr (contents, props changed)
> Modified:
> head/sysutils/Makefile
>
> Modified: head/sysutils/Makefile
>
> ==============================================================================
> --- head/sysutils/Makefile Sun Apr 28 19:08:18 2019 (r500362)
> +++ head/sysutils/Makefile Sun Apr 28 19:22:21 2019 (r500363)
> @@ -301,6 +301,7 @@
> SUBDIR += env4801
> SUBDIR += envconsul
> SUBDIR += epazote
> + SUBDIR += etc_os-release
> SUBDIR += etcmerge
> SUBDIR += etcupdate
> SUBDIR += eventlog
>
> Added: head/sysutils/etc_os-release/Makefile
>
> ==============================================================================
> --- /dev/null 00:00:00 1970 (empty, because file is newly added)
> +++ head/sysutils/etc_os-release/Makefile Sun Apr 28 19:22:21 2019
> (r500363)
> @@ -0,0 +1,34 @@
> +# $FreeBSD$
> +
> +PORTNAME= etc_os-release
> +PORTVERSION= 0.1
> +CATEGORIES= sysutils kde gnome
> +MASTER_SITES= #
> +DISTFILES= #
> +EXTRACT_ONLY= #
> +
> +MAINTAINER= tcberner at FreeBSD.org
> +COMMENT= Operating system identification file
> +
> +NO_BUILD= yes
> +
> +PLIST_FILES= etc/os-release
> +
> +VERSION!= freebsd-version -u
> +VERSION_ID= ${VERSION:C/^([0-9\.]+).*/\1/}
> +
> +CONTENTS= 'NAME=FreeBSD\0'$\
> + 'VERSION=${VERSION}\0'$\
> + 'ID=${VERSION_ID}\0'$\
> + 'VERSION_ID=freebsd\0'$\
> + 'ANSI_COLIR="0;31"\0'$\
>
Typo here. s/COLIR/COLOR/
> + 'PRETTY_NAME="FreeBSD ${VERSION}"\0'$\
> + 'CPE_NAME=cpe:/o:freebsd:freebsd:${VERSION_ID}\0'$\
> + 'HOME_URL=https://freebsd.org/\0'$\
It would be better to use https://www.freebsd.org/ since freebsd.org redirects
to www.freebsd.org.
> + 'BUG_REPORT_URL=https://bugs.freebsd.org'
May I suggest putting all these in a tiny sh script in files directory?
It would look more clear.
You could run it to generate to-be-installed os-release in build phase.
+
> +do-install:
> + ${MKDIR} ${STAGEDIR}${PREFIX}/etc
> + ${ECHO} -e ${CONTENTS} | ${XARGS} -0 -n 1 >>
> ${STAGEDIR}${PREFIX}/${PLIST_FILES}
> +
> +.include <bsd.port.mk>
>
> Added: head/sysutils/etc_os-release/pkg-descr
>
> ==============================================================================
> --- /dev/null 00:00:00 1970 (empty, because file is newly added)
> +++ head/sysutils/etc_os-release/pkg-descr Sun Apr 28 19:22:21 2019
> (r500363)
> @@ -0,0 +1,4 @@
> +This package installs /usr/local/etc/os-release file which contains
> version and
> +other information about installed operating system.
> +
> +WWW: https://www.freedesktop.org/software/systemd/man/os-release.html
>
>
More information about the svn-ports-all
mailing list