Github messages for voidlinux
 help / color / mirror / Atom feed
From: jirib <jirib@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: rpm odd output of rpm macro
Date: Thu, 20 Feb 2020 15:18:00 +0100	[thread overview]
Message-ID: <20200220141800.04zgZ_qOf704-aNDYV91QSMNcHAFkwBO7TDnZ6Aqrkc@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-19321@inbox.vuxu.org>

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

New comment by jirib on void-packages repository

https://github.com/void-linux/void-packages/issues/19321#issuecomment-589065843

Comment:
```
$ grep sharedstatedir /usr/lib/rpm/platform/amd64-linux/macros 
%_sharedstatedir        %{_prefix}/com
```
strange, why does it return long unused value? should we patch macros from fedora so we are in sync with 21st centrury?

this is diff against CentOS:

```
--- /usr/lib/rpm/platform/amd64-linux/macros	2019-12-23 14:11:46.000000000 +0100
+++ /tmp/macros	2020-02-20 15:15:42.545675388 +0100
@@ -5,7 +5,7 @@
 #
 %_arch			x86_64
 %_build_arch		x86_64
-%_vendor		unknown
+%_vendor		redhat
 %_os			linux
 %_gnu			-gnu
 %_target_platform	%{_target_cpu}-%{_vendor}-%{_target_os}
@@ -27,20 +27,20 @@
 #
 %_prefix		/usr
 %_exec_prefix		%{_prefix}
-%_bindir		/usr/bin
-%_sbindir		/usr/bin
+%_bindir		%{_exec_prefix}/bin
+%_sbindir		%{_exec_prefix}/sbin
 %_libexecdir		%{_exec_prefix}/libexec
 %_datarootdir		%{_prefix}/share
 %_datadir		%{_datarootdir}
 %_sysconfdir		/etc
-%_sharedstatedir	%{_prefix}/com
+%_sharedstatedir	/var/lib
 %_localstatedir		/var
 %_lib			lib64
 %_libdir		%{_prefix}/lib64
 %_includedir		%{_prefix}/include
 %_oldincludedir		/usr/include
-%_infodir		/usr/share/info
-%_mandir		/usr/share/man
+%_infodir		%{_datarootdir}/info
+%_mandir		%{_datarootdir}/man
 %_initddir		%{_sysconfdir}/rc.d/init.d
 # Deprecated misspelling, present for backwards compatibility.
 %_initrddir		%{_initddir}
@@ -48,21 +48,9 @@
 
 %_defaultdocdir		%{_datadir}/doc
 
-# Maximum number of CPU's to use when building, 0 for unlimited.
-#%_smp_ncpus_max 0
-
-%_smp_build_ncpus %([ -z "$RPM_BUILD_NCPUS" ] \\\
-	&& RPM_BUILD_NCPUS="%{getncpus}"; \\\
-        ncpus_max=%{?_smp_ncpus_max}; \\\
-        if [ -n "$ncpus_max" ] && [ "$ncpus_max" -gt 0 ] && [ "$RPM_BUILD_NCPUS" -gt "$ncpus_max" ]; then RPM_BUILD_NCPUS="$ncpus_max"; fi; \\\
-        echo "$RPM_BUILD_NCPUS";)
-
-%_smp_mflags -j%{_smp_build_ncpus}
-
-# Maximum number of threads to use when building, 0 for unlimited
-#%_smp_nthreads_max 0
-
-%_smp_build_nthreads %{_smp_build_ncpus}
+%_smp_mflags %([ -z "$RPM_BUILD_NCPUS" ] \\\
+	&& RPM_BUILD_NCPUS="`/usr/bin/getconf _NPROCESSORS_ONLN`"; \\\
+	[ "$RPM_BUILD_NCPUS" -gt 1 ] && echo "-j$RPM_BUILD_NCPUS")
 
 #==============================================================================
 # ---- Build policy macros.
@@ -72,24 +60,12 @@
 #
 
 %__arch_install_post   %{nil}
-%_python_bytecompile_errors_terminate_build 0
-%_python_bytecompile_extra   1
-
-# Standard brp-macro naming:
-# convert all '-' in basename to '_', add two leading underscores.
-%__brp_compress %{_rpmconfigdir}/brp-compress %{?_prefix}
-%__brp_java_gcjcompile %{_rpmconfigdir}/brp-java-bytecompile
-%__brp_python_bytecompile %{_rpmconfigdir}/brp-python-bytecompile "" "%{?_python_bytecompile_errors_terminate_build}" "%{?_python_bytecompile_extra}"
-%__brp_strip %{_rpmconfigdir}/brp-strip %{__strip}
-%__brp_strip_comment_note %{_rpmconfigdir}/brp-strip-comment-note %{__strip} %{__objdump}
-%__brp_strip_shared %{_rpmconfigdir}/brp-strip-shared
-%__brp_strip_static_archive %{_rpmconfigdir}/brp-strip-static-archive %{__strip}
 
 %__os_install_post    \
-    %{?__brp_compress} \
-    %{?__brp_strip} \
-    %{?__brp_strip_static_archive} \
-    %{?__brp_strip_comment_note} \
+    %{_rpmconfigdir}/brp-compress \
+    %{_rpmconfigdir}/brp-strip %{__strip} \
+    %{_rpmconfigdir}/brp-strip-static-archive %{__strip} \
+    %{_rpmconfigdir}/brp-strip-comment-note %{__strip} %{__objdump} \
 %{nil}
 
 %__spec_install_post\
```

  parent reply	other threads:[~2020-02-20 14:18 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-20 14:11 [ISSUE] " jirib
2020-02-20 14:12 ` jirib
2020-02-20 14:18 ` jirib [this message]
2020-02-20 14:20 ` jirib
2020-02-28  6:34 ` jirib
2021-03-22 19:51 ` jirib
2021-03-22 19:51 ` [ISSUE] [CLOSED] " jirib

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=20200220141800.04zgZ_qOf704-aNDYV91QSMNcHAFkwBO7TDnZ6Aqrkc@z \
    --to=jirib@users.noreply.github.com \
    --cc=ml@inbox.vuxu.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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).