Bug 209724 - x11/xloadimage: Build fails if Samba is installed as PDC
Summary: x11/xloadimage: Build fails if Samba is installed as PDC
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Dmitry Marakasov
Keywords: needs-qa, patch
Depends on:
Reported: 2016-05-23 22:56 UTC by mail_of_sergey
Modified: 2016-06-06 10:19 UTC (History)
2 users (show)

See Also:
vlad-fbsd: maintainer-feedback? (ak)

compiling log (2.85 KB, application/x-7z-compressed)
2016-05-23 22:56 UTC, mail_of_sergey
no flags Details
Proposed fix (1.08 KB, patch)
2016-05-24 13:27 UTC, Dmitry Marakasov
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description mail_of_sergey 2016-05-23 22:56:08 UTC
Created attachment 170583 [details]
compiling log

If Samba is installed and configured as PDC, xloadimage fail on BUILTIN\users:

build.c:4:213: error: \u used with no following hex digits
char *BuildUser= "uid=0(root) gid=0(wheel) groups=0(wheel),5(operator),1050(admin_nt_group),1069(domain_users),1083(softholder),1106(printer_admins),1322(winbindd_priv),10189(BUILTIN\administrators),10190(BUILTIN\users)";
Comment 1 Dmitry Marakasov freebsd_committer 2016-05-24 13:27:08 UTC
Created attachment 170598 [details]
Proposed fix

Please check out attached patch.

It solves another problem: we're moving towards reproducible port builds, and xloadimage is not compatible with it as it compiles current date and `uname -a` output which changes across different systems into the binary. Also it's unable to detect operating system name correctly. So, don't compile date, uname and `id` output in, fixing both problems, and set OS name correctly for better `xloadimage -version` output
Comment 2 Dmitry Marakasov freebsd_committer 2016-05-24 13:27:53 UTC
Awaiting maintainer's feedback
Comment 3 mail_of_sergey 2016-05-27 11:35:53 UTC
(In reply to Dmitry Marakasov from comment #1)
No, I got the same error.
Comment 4 Dmitry Marakasov freebsd_committer 2016-05-28 20:41:03 UTC
You can't have the same error as `id` output can no longer end up in build.c. Please verify that you've placed the patch properly in files/ subdirectory. After patch phase, work/xloadimage.4.1/build-info should be the following:

# this generates the "build.c" file

# try to find out the build date

  date='char *BuildDate= (char *)0;'

# try to find out who's doing the build.  there are two common places
# for 'id', /bin/id and /usr/bin/id.

    user='char *BuildUser= (char *)0;'

# try to find out the system information

  uname='char *BuildSystem= "FreeBSD";'

echo $uname >> build.c
echo $date >> build.c
echo $user >> build.c
Comment 5 mail_of_sergey 2016-05-29 09:00:58 UTC
(In reply to Dmitry Marakasov from comment #4)
Sorry, now all correct.
Comment 6 Dmitry Marakasov freebsd_committer 2016-05-29 13:05:39 UTC
Thanks for testing!

Reopening as the patch has not been committed yet.
Awaiting maintainer's feedback.
Comment 7 commit-hook freebsd_committer 2016-06-06 04:42:20 UTC
A commit references this bug:

Author: ak
Date: Mon Jun  6 04:42:15 UTC 2016
New revision: 416442
URL: https://svnweb.freebsd.org/changeset/ports/416442

  - Regenerate distinfo
  - Fix build when Samba is installed and configured as PDC [1]
  - Make build reproducible [2]

  PR:	209724
  Submitted by:	mail_of_sergey@mail.ru
  Submitted by:	amdmi3 [1] [2]

Comment 8 Alex Kozlov freebsd_committer 2016-06-06 04:44:37 UTC
I apologize for my inattention, somehow I failed to get notices from bugzilla for this pr and only discovered it from last weekly reminder.
Comment 9 mail_of_sergey 2016-06-06 10:19:57 UTC
I test by 
make clean reinstall clean
it's works!

Thanks for all!