FreeBSD Bugzilla – Attachment 194220 Details for
Bug 228981
sysutils/py-salt: fix sysctl.present on FreeBSD
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
v1
salt-sysctl.diff (text/plain), 1.53 KB, created by
Mathieu Arnold
on 2018-06-13 12:04:42 UTC
(
hide
)
Description:
v1
Filename:
MIME Type:
Creator:
Mathieu Arnold
Created:
2018-06-13 12:04:42 UTC
Size:
1.53 KB
patch
obsolete
>base commit: r472303 >diff --git sysutils/py-salt/Makefile sysutils/py-salt/Makefile >index 26888a5898b0..ce34a52f4d83 100644 >--- sysutils/py-salt/Makefile >+++ sysutils/py-salt/Makefile >@@ -3,7 +3,7 @@ > > PORTNAME= salt > PORTVERSION= 2018.3.0 >-PORTREVISION= 1 >+PORTREVISION= 2 > CATEGORIES= sysutils python > MASTER_SITES= CHEESESHOP > PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} >diff --git sysutils/py-salt/files/patch-salt_modules_freebsd__sysctl.py sysutils/py-salt/files/patch-salt_modules_freebsd__sysctl.py >new file mode 100644 >index 000000000000..ecf227971d1a >--- /dev/null >+++ sysutils/py-salt/files/patch-salt_modules_freebsd__sysctl.py >@@ -0,0 +1,21 @@ >+commit 101f170fe525d7f9f8d0c9b80a78af2ed1f6f069 >+Author: Mathieu Arnold <mat@mat.cc> >+Date: 2018-06-13 13:02:37 +0200 >+ >+ Fix patching sysctl.conf on FreeBSD. >+ >+ In b3c1be27fb the lines were stripped of their ending \n, but the \n was >+ never added back to the lines, so calling writelines generates a broken >+ one line file. >+ >+--- salt/modules/freebsd_sysctl.py.orig 2018-04-02 16:35:12 UTC >++++ salt/modules/freebsd_sysctl.py >+@@ -165,7 +165,7 @@ def persist(name, value, config='/etc/sy >+ if not edited: >+ nlines.append("{0}\n".format(_formatfor(name, value, config))) >+ with salt.utils.files.fopen(config, 'w+') as ofile: >+- nlines = [salt.utils.stringutils.to_str(_l) for _l in nlines] >++ nlines = [salt.utils.stringutils.to_str(_l) + '\n' for _l in nlines] >+ ofile.writelines(nlines) >+ if config != '/boot/loader.conf': >+ assign(name, value)
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 228981
: 194220