Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redo version detection in autoconf to use modern practices #3603

Closed
mc-butler opened this issue Mar 6, 2016 · 31 comments
Closed

Redo version detection in autoconf to use modern practices #3603

mc-butler opened this issue Mar 6, 2016 · 31 comments
Assignees
Labels
area: core Issues not related to a specific subsystem prio: low Minor problem or easily worked around
Milestone

Comments

@mc-butler
Copy link

Important

This issue was migrated from Trac:

Origin https://midnight-commander.org/ticket/3603
Reporter zaytsev (@zyv)
Mentions egmont (@egmontkob), info@….net (@metux)

Currently we have a custom macro mc_VERSION used to autodetect the version from git tags. This is a problem, because we can't modernize our autoconf build system to use currently supported invocations of AC_INIT and AM_INIT_AUTOMAKE.

One important use case for fixing this would be to switch to tar-pax in our tarballs or at least set filename-length-max=99 to catch broken tarballs on make dist. Currently that's next to impossible, and Travis was building broken tarballs without anyone noticing for quite some time.

The correct way to autodetect version string with autotools is to use the m4_esyscmd_s macro. This macro is used by autoconf itself at least since autoconf 2.62 (so, an example can be found in its source code).

@mc-butler
Copy link
Author

Changed by andrew_b (@aborodin) on Apr 2, 2016 at 7:35 UTC (comment 1)

Related to #2252.

@mc-butler
Copy link
Author

Changed by and on Apr 2, 2016 at 15:01 UTC (comment 2)

Yep, plus get rid of

configure.ac:13: warning: AM_INIT_AUTOMAKE: two- and three-arguments forms are deprecated.  For more info, see:
configure.ac:13: http://www.gnu.org/software/automake/manual/automake.html#Modernize-AM_005fINIT_005fAUTOMAKE-invocation

Questionable is with which required autoconf version we what to go.
Too high version requirement means out-of-the-box compiling from git will failed on older distributions. But I see only rhel6 (autoconf 2.63) compromise.

@mc-butler
Copy link
Author

Changed by and on Apr 2, 2016 at 15:18 UTC

@mc-butler
Copy link
Author

Changed by zaytsev (@zyv) on Apr 30, 2016 at 21:01 UTC (comment 3)

  • Milestone changed from Future Releases to 4.8.18

@mc-butler
Copy link
Author

Changed by zaytsev (@zyv) on May 7, 2016 at 16:20 UTC (comment 4)

Reminder to myself:

configure.ac:268: warning: The 'AM_PROG_MKDIR_P' macro is deprecated, and its use is discouraged.
configure.ac:268: You should use the Autoconf-provided 'AC_PROG_MKDIR_P' macro instead,
configure.ac:268: and use '$(MKDIR_P)' instead of '$(mkdir_p)'in your Makefile.am files.

@mc-butler
Copy link
Author

Changed by zaytsev (@zyv) on May 7, 2016 at 17:05 UTC (comment 5)

Another thing: I wonder where this comes from -

ar: `u' modifier ignored since `D' is the default (see `U')

Fedora 23.

@mc-butler
Copy link
Author

Changed by zaytsev (@zyv) on May 8, 2016 at 10:42 UTC (comment 6)

Okay, I have finally found where the AM_PROG_MKDIR_P comes from. This is from gettext-0.18, and it's pulled in by autopoint even though I have 0.19.x installed on the build host, because that's what we require in configure.ac. It will be gone if we bump the requirement to at least gettext-0.18.2, but this will already exclude people trying to bootstrap mc on Ubuntu 12.04. I guess we'll be able to get rid of it in a couple of years... :-/

@mc-butler
Copy link
Author

Changed by zaytsev (@zyv) on May 8, 2016 at 10:55 UTC (comment 7)

Re. "ar: `u' modifier ignored" problem, it seems that wait & do nothing is the best strategy:

https://bugzilla.redhat.com/show_bug.cgi?id=1155273

@mc-butler
Copy link
Author

Changed by zaytsev (@zyv) on Sep 22, 2016 at 18:48 UTC (comment 8)

  • Milestone changed from 4.8.18 to 4.8.19

@mc-butler
Copy link
Author

Changed by andrew_b (@aborodin) on Dec 7, 2016 at 8:00 UTC (comment 9)

  • Status changed from new to accepted
  • Owner set to andrew_b
  • Branch state changed from no branch to on review

Branch: 3603_version
Initial [98f52561a31d7229a49885466ddbf1c8b5ec440a]

@mc-butler
Copy link
Author

Changed by zaytsev-work (@zyv) on Dec 7, 2016 at 9:05 UTC (comment 10)

After your changes DISTR_VERSION will be blank I thin; if you are not in a hurry, I would really like to check everything that has to do with versioning first, I think this can wait for a long time... :-/

@mc-butler
Copy link
Author

Changed by andrew_b (@aborodin) on Dec 7, 2016 at 10:53 UTC (comment 10.11)

Replying to zaytsev-work:

After your changes DISTR_VERSION will be blank

Fixed.

@mc-butler
Copy link
Author

Changed by egmont (@egmontkob) on Dec 7, 2016 at 16:30 UTC (comment 12)

Hi guys,

Are you planning to address the related bug #2252 any time soon? Will this fix bring us closer to that?

Getting rid of autogen runs and complete rebuilds during e.g. a git bisect would be a big developer productivity boost.

@mc-butler
Copy link
Author

Changed by and on Dec 7, 2016 at 21:14 UTC (comment 13)

If "proper AC_INIT and AM_INIT_AUTOMAKE usage" seems unlikely
please have a look into util-linux or wget source code.

These using a more common way to deal with git/tarball versions.

 m4_esyscmd([build-aux/git-version-gen .tarball-version]),
 m4_esyscmd([tools/git-version-gen .tarball-version]),

@mc-butler
Copy link
Author

Changed by zaytsev (@zyv) on Dec 8, 2016 at 6:26 UTC (comment 14)

@egmont, with the current patch it will make matters even worse in terms of #2252. That's why I'm not very happy about merging it in its current form. My plan was to look into autotools and/or other packages as @and says to find out how they do versioning, and try to port it over to mc, including fixing the #2252 while we are at it. When I can find time for that, I can't say :-(

@mc-butler
Copy link
Author

Changed by egmont (@egmontkob) on Dec 8, 2016 at 15:28 UTC (comment 15)

  • Cc set to egmont

@mc-butler
Copy link
Author

Changed by andrew_b (@aborodin) on Dec 14, 2016 at 10:39 UTC (comment 16)

  • Branch state changed from on review to on rework

@mc-butler
Copy link
Author

Changed by zaytsev (@zyv) on Nov 18, 2017 at 17:30 UTC (comment 17)

  • Milestone changed from 4.8.20 to 4.8.21

@mc-butler
Copy link
Author

Changed by zaytsev (@zyv) on May 27, 2018 at 13:14 UTC (comment 18)

  • Milestone changed from 4.8.21 to 4.8.22

@mc-butler
Copy link
Author

Changed by zaytsev (@zyv) on Dec 29, 2018 at 14:56 UTC (comment 19)

  • Milestone changed from 4.8.22 to 4.8.23

@mc-butler
Copy link
Author

Changed by zaytsev (@zyv) on Jun 16, 2019 at 17:19 UTC (comment 20)

  • Milestone changed from 4.8.23 to 4.8.24

@mc-butler
Copy link
Author

Changed by metux (@metux) on Aug 8, 2019 at 20:31 UTC (comment 21)

  • Cc changed from egmont to egmont, info@….net

@mc-butler
Copy link
Author

Changed by zaytsev (@zyv) on Jul 5, 2020 at 17:27 UTC (comment 22)

  • Milestone changed from 4.8.25 to 4.8.26

@mc-butler
Copy link
Author

Changed by and on Dec 30, 2020 at 16:20 UTC (comment 23)

Another try to tidy up deprecate AM_INIT_AUTOMAKE :)

@mc-butler
Copy link
Author

Changed by and on Dec 30, 2020 at 16:21 UTC

@mc-butler
Copy link
Author

Changed by and on Dec 30, 2020 at 16:52 UTC

@mc-butler
Copy link
Author

Changed by zaytsev (@zyv) on Jan 10, 2021 at 14:19 UTC (comment 24)

  • Milestone changed from 4.8.26 to 4.8.27

@mc-butler
Copy link
Author

Changed by andrew_b (@aborodin) on Mar 20, 2021 at 10:18 UTC (comment 25)

  • Type changed from enhancement to task
  • Branch state changed from on rework to on review

Branch: 3603_version
Initial [94d954a8e8e36061d60690f0ee7fd843c8cbc2d9]

@mc-butler
Copy link
Author

Changed by andrew_b (@aborodin) on Mar 28, 2021 at 16:39 UTC (comment 26)

  • Votes set to andrew_b
  • Branch state changed from on review to approved

@mc-butler
Copy link
Author

Changed by andrew_b (@aborodin) on Mar 28, 2021 at 16:40 UTC (comment 27)

  • Branch state changed from approved to merged
  • Votes changed from andrew_b to committed-master
  • Status changed from accepted to testing
  • Resolution set to fixed

Merged to master: [8519c7e].

git log --pretty=oneline 6a6fdf1ae..8519c7e5b

@mc-butler
Copy link
Author

Changed by andrew_b (@aborodin) on Mar 28, 2021 at 16:42 UTC (comment 28)

  • Status changed from testing to closed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: core Issues not related to a specific subsystem prio: low Minor problem or easily worked around
Development

No branches or pull requests

2 participants