git: rcs: Clean up the Makefiles.

2018-06-08 Thread Sascha Wildner


commit 6748ecc0bfae483afaa20ada549152e2e4f39ae7
Author: Sascha Wildner 
Date:   Fri Jun 8 23:40:18 2018 +0200

rcs: Clean up the Makefiles.

* Close the Makefile.inc chain to gnu/usr.bin/Makefile.inc.

* Use the SCRIPTS variable instead of using afterinstall.

Summary of changes:
 gnu/usr.bin/rcs/Makefile.inc   | 3 ++-
 gnu/usr.bin/rcs/ci/Makefile| 1 -
 gnu/usr.bin/rcs/co/Makefile| 1 -
 gnu/usr.bin/rcs/ident/Makefile | 1 -
 gnu/usr.bin/rcs/merge/Makefile | 1 -
 gnu/usr.bin/rcs/rcs/Makefile   | 2 --
 gnu/usr.bin/rcs/rcsclean/Makefile  | 1 -
 gnu/usr.bin/rcs/rcsdiff/Makefile   | 1 -
 gnu/usr.bin/rcs/rcsfreeze/Makefile | 7 +--
 gnu/usr.bin/rcs/rcsmerge/Makefile  | 1 -
 gnu/usr.bin/rcs/rlog/Makefile  | 1 -
 11 files changed, 3 insertions(+), 17 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/6748ecc0bfae483afaa20ada549152e2e4f39ae7


-- 
DragonFly BSD source repository


git: x86_64: Implement x2apic support.

2018-06-08 Thread Sepherosa Ziehau


commit f89b4a45c33ccb84eab6ec70ca37a5b9e33e5a81
Author: Sepherosa Ziehau 
Date:   Tue Jun 5 23:03:46 2018 +0800

x86_64: Implement x2apic support.

Now LAPIC registers are accessed through MSR at fixed location, instead
of going through MMIO region.

Most noticeable is that ICR operation is greatly simplified, i.e. IPI
sending operation:
- Reserved bits are read as 0; there is no need to read ICR first for
  OR with the new values.
- No more pending bit, i.e. ICR write is synchronized; there is no need
  to read ICR to test pending bit.
- ICR is 64 bits in x2apic mode, i.e. two 32 bits writes to ICR-low and
  ICR-high become one write to ICR.

NOTE:
Though Intel SDM says that wrmsr to LAPIC registers are relaxed, we
don't need to put mfence or sfence before them, especially for sending
IPIs, since the generic IPIQ and the machdep code already uses atomic
operation before doing ICR operation.  For the rest of the code, there
really are no needs to add mfence/sfence before rdmsr/wrmsr to LAPIC
registers.

As of this commit, x2apic mode is _not_ enabled by default.  It can be
enabled through hw.x2apic_enable tuneable, and a read-only sysctl node
with the same name is available for debugging purpose.

Based on work by ivadasz@.

Summary of changes:
 sys/cpu/x86_64/include/specialreg.h   |   1 +
 sys/platform/pc64/acpica/acpi_madt.c  |  44 +---
 sys/platform/pc64/apic/apicreg.h  |  28 
 sys/platform/pc64/apic/lapic.c| 125 --
 sys/platform/pc64/apic/lapic.h|  24 +--
 sys/platform/pc64/x86_64/mp_machdep.c |   4 ++
 6 files changed, 207 insertions(+), 19 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/f89b4a45c33ccb84eab6ec70ca37a5b9e33e5a81


-- 
DragonFly BSD source repository


git: DragonFly_RELEASE_5_2 nrelease/Makefile: Fix to use GITURL_{SRC, DPORTS} and update help

2018-06-08 Thread Aaron LI


commit 60654128f150954bc0f3f837c229b5d5ecf18dff
Author: Aaron LI 
Date:   Fri Jun 8 15:58:47 2018 +0800

nrelease/Makefile: Fix to use GITURL_{SRC,DPORTS} and update help

The GITHOST and GITHOST_DPORTS were updated to be GITURL_SRC and 
GITURL_DPORTS
in ad8b70e08d7600e3f4eb3b36556d4540b1a9c119.

Summary of changes:
 nrelease/Makefile | 32 
 1 file changed, 16 insertions(+), 16 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/60654128f150954bc0f3f837c229b5d5ecf18dff


-- 
DragonFly BSD source repository


git: etc/Makefile: Do not install rc.firewall as executable

2018-06-08 Thread Aaron LI


commit af0aa05239550f7ac7afbaf1fd762233c113c290
Author: Aaron LI 
Date:   Fri Jun 1 12:19:07 2018 +0800

etc/Makefile: Do not install rc.firewall as executable

/etc/rc.firewall doesn't need to be installed as executable, similar to
/etc/rc.firewall6 .

Summary of changes:
 etc/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/af0aa05239550f7ac7afbaf1fd762233c113c290


-- 
DragonFly BSD source repository


git: initrd/rc: mount initrd ro; set PATH, HOME, NEW_ROOT; cleanups

2018-06-08 Thread Aaron LI


commit bffbc0686a965d67b3c33dbd3eab87e7df313aa0
Author: Aaron LI 
Date:   Fri Jun 1 15:14:27 2018 +0800

initrd/rc: mount initrd ro; set PATH, HOME, NEW_ROOT; cleanups

* The initrd is mounted readonly by default, do not upgrade to be readwrite.

  NOTE: This may cause problem with diskless boot (/etc/rc.d/diskless) and
  needs further tests and tunes (Thanks to ftigeot).

* Set PATH=/bin:/sbin to simplify the command invocations.

* Set HOME=/var/home (Suggested-by: ftigeot)

* Set NEW_ROOT=/new_root that will be used in the mount scripts.

  Make sure that the NEW_ROOT directory exist, otherwise try to remount the
  initrd / readwrite and create it.

* Various cleanups to make it much simpler and cleaner.

* Also clean up the rc.lvm2 a bit.

Summary of changes:
 share/initrd/etc/rc  | 64 
 share/initrd/etc/rc.lvm2 | 12 -
 2 files changed, 37 insertions(+), 39 deletions(-)
 mode change 100755 => 100644 share/initrd/etc/rc
 mode change 100755 => 100644 share/initrd/etc/rc.lvm2

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/bffbc0686a965d67b3c33dbd3eab87e7df313aa0


-- 
DragonFly BSD source repository


git: nrelease/Makefile: Fix to use GITURL_{SRC, DPORTS} and update help

2018-06-08 Thread Aaron LI


commit 8126e4ef69615a815a2767b95b8f7b934ca1e56d
Author: Aaron LI 
Date:   Fri Jun 8 15:58:47 2018 +0800

nrelease/Makefile: Fix to use GITURL_{SRC,DPORTS} and update help

The GITHOST and GITHOST_DPORTS were updated to be GITURL_SRC and 
GITURL_DPORTS
in ad8b70e08d7600e3f4eb3b36556d4540b1a9c119.

Summary of changes:
 nrelease/Makefile | 32 
 1 file changed, 16 insertions(+), 16 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/8126e4ef69615a815a2767b95b8f7b934ca1e56d


-- 
DragonFly BSD source repository


git: initrd: Detach from the world and build on the fly

2018-06-08 Thread Aaron LI


commit e79a303f7db7331d570bb6c6abdd555eeefdcdc2
Author: Aaron LI 
Date:   Sat Jun 2 13:31:45 2018 +0800

initrd: Detach from the world and build on the fly

Why
---
Currently, the files for initrd image creation are built and installed at
/usr/share/initrd by "buildworld" and "installworld", respectively, and then
mkinitrd(8) simply packs them to create the initrd.img.gz.

For normal users, the shipped /usr/share/initrd and mkinitrd(8) don't make
much sense, since they don't need to modify the initrd contents and create
a modified initrd image.

From a developer's perspective, the required steps (buildworld, installworld
and mkinitrd) to create and test a new initrd image can be annoying.

How
---
Detach the build and installation of the initrd contents from the world.
Build the (rescue/initrd) tools on-the-fly when creating the initrd image.

As per ftigeot's suggestion, these statically linked tools can be useful 
when
dealing with a broken system, so install them under /rescue to be more
intuitive and easier to use (similar to FreeBSD and maybe other BSDs).

What

* Move "share/initrd" to be top-level, and detach it from world.

  + Update the patch in bsd.crunchgen.mk accordingly.
  + Add Makefile.inc to simplify subdir's makefiles.
  + Rewrite the Makefile with targets:
- rescue: build and install the rescue tools into /rescue.
- initrd: further packs the etc and rescue staffs to create the initrd
  image.

* Move "sbin/mkinitrd/mkinitrd.sh" under the new "initrd" directory and 
adapt
  it to work with the "initrd" make target.  Remove the other parts of
  mkinitrd(8).

* Export the above "rescue" and "initrd" targets to be top-level.

* Update nrelease framework to use the new "make initrd".

* Update build.7 man page accordingly.

* Print the message about updating the initrd image and 3rd-party packages
  after "make upgrade" instead of "make installworld".

* Document this change in UPDATING.

* Other small updates and style cleanups.

TODO

* Add initrd.7 man page
* Crunch more useful tools
* Crunch bin/sbin/etc. into a bundle to save space (??)

Reviewed-by: swildner
Thanks-to: dillon, swildner, ftigeot

Summary of changes:
 Makefile   |  33 ++-
 Makefile.inc1  |  11 -
 Makefile_upgrade.inc   |   5 +
 README |   3 +
 UPDATING   |   8 +
 etc/Makefile   |   2 +-
 etc/mtree/BSD.root.dist|   2 +
 etc/mtree/BSD.usr.dist |   8 -
 initrd/Makefile|  30 +++
 initrd/Makefile.inc|   8 +
 {share/initrd => initrd}/bin/Makefile  |   5 -
 {share/initrd => initrd}/bin/dowpa |   2 +-
 initrd/etc/Makefile|  24 ++
 {share/initrd => initrd}/etc/motd  |   0
 {share/initrd => initrd}/etc/rc|   0
 {share/initrd => initrd}/etc/rc.lvm2   |   0
 {share/initrd => initrd}/etc/rcmount_crypt |   0
 {share/initrd => initrd}/etc/rcmount_tcplay|   0
 initrd/mkinitrd.sh | 295 +
 {share/initrd/mini_init => initrd/oinit}/Makefile  |   5 -
 {share/initrd/mini_init => initrd/oinit}/oinit.c   |  10 +-
 .../initrd/mini_init => initrd/oinit}/pathnames.h  |   3 +-
 {share/initrd => initrd}/sbin.libcrypto/Makefile   |   7 +-
 {share/initrd => initrd}/sbin.lvm/Makefile |   9 +-
 {share/initrd => initrd}/sbin/Makefile |   7 +-
 nrelease/Makefile  |  20 +-
 sbin/Makefile  |   1 -
 sbin/mkinitrd/Makefile |   5 -
 sbin/mkinitrd/mkinitrd.8   | 189 -
 sbin/mkinitrd/mkinitrd.sh  | 240 -
 share/Makefile |  27 +-
 share/initrd/Makefile  |   3 -
 share/initrd/etc/Makefile  |  33 ---
 share/man/man7/build.7 |  17 +-
 share/mk/bsd.crunchgen.mk  |   2 +-
 35 files changed, 453 insertions(+), 561 deletions(-)
 create mode 100644 initrd/Makefile
 create mode 100644 initrd/Makefile.inc
 rename {share/initrd => initrd}/bin/Makefile (95%)
 rename {share/initrd => initrd}/bin/dowpa (90%)
 create mode 100644 initrd/etc/Makefile
 rename {share/initrd => initrd}/etc/motd (100%)
 rename {share/initrd => initrd}/etc/rc (100%)
 rename {share/initrd => 

git: hammer2: do not print error=0x0000 on bulkfree

2018-06-08 Thread Aaron LI


commit 746bb04f7f7f1ec434bb18a3463c910eb6fc7f4d
Author: Aaron LI 
Date:   Fri Jun 1 12:09:59 2018 +0800

hammer2: do not print error=0x on bulkfree

Make hammer2 bulkfree do not print "error=0x" (i.e., no error occurred).
This makes the system log messages (/var/log/messages) a bit cleaner.

Fix minor whitespace issues as well.

Summary of changes:
 sys/vfs/hammer2/hammer2_bulkfree.c | 29 -
 1 file changed, 16 insertions(+), 13 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/746bb04f7f7f1ec434bb18a3463c910eb6fc7f4d


-- 
DragonFly BSD source repository


git: Makefile{, .inc1}: Merge user-driven target descriptions and cleanups

2018-06-08 Thread Aaron LI


commit f71956f75f646783a438957a0c60e142bbb8725d
Author: Aaron LI 
Date:   Sat Jun 2 13:09:19 2018 +0800

Makefile{,.inc1}: Merge user-driven target descriptions and cleanups

* Merge the descriptions to user-driven targets from Makefile.inc1 to
  Makefile and improve the wordings a bit.

* Delete some obsolete information.

* Whitespace cleanups.

Summary of changes:
 Makefile  | 54 +-
 Makefile.inc1 | 39 +++
 2 files changed, 36 insertions(+), 57 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/f71956f75f646783a438957a0c60e142bbb8725d


-- 
DragonFly BSD source repository


git: periodic: return $rc instead of "$rc" for several scripts

2018-06-08 Thread Aaron LI


commit 93d00c83db6186c0fc528c1a7c3ca9c215444c94
Author: Aaron LI 
Date:   Fri Jun 1 12:56:05 2018 +0800

periodic: return $rc instead of "$rc" for several scripts

Also fix a minor whitespace issue in 200.chkmounts .

Summary of changes:
 etc/periodic/security/200.chkmounts  | 4 ++--
 etc/periodic/security/300.chkuid0| 2 +-
 etc/periodic/security/400.passwdless | 2 +-
 etc/periodic/security/410.logincheck | 2 +-
 4 files changed, 5 insertions(+), 5 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/93d00c83db6186c0fc528c1a7c3ca9c215444c94


-- 
DragonFly BSD source repository


git: mk/crunchgen: Fix the ${MAKE} quotation and improve style

2018-06-08 Thread Aaron LI


commit df820087d62ba7fa38c40615f9f8e6e5a751d839
Author: Aaron LI 
Date:   Fri Jun 1 13:06:22 2018 +0800

mk/crunchgen: Fix the ${MAKE} quotation and improve style

The fix to the ${MAKE} quotation is brought from FreeBSD.

Various style fixes to make this makefile look much cleaner.

Summary of changes:
 share/mk/bsd.crunchgen.mk | 54 +--
 1 file changed, 24 insertions(+), 30 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/df820087d62ba7fa38c40615f9f8e6e5a751d839


-- 
DragonFly BSD source repository


git: initrd: symlink tmp to var/tmp to save a second tmpfs mount

2018-06-08 Thread Aaron LI


commit 2c6b09fdbe57f3e43b56cb5e7d8fc589aa70c0b0
Author: Aaron LI 
Date:   Fri Jun 1 14:57:37 2018 +0800

initrd: symlink tmp to var/tmp to save a second tmpfs mount

Since a tmpfs is required to mount at /var in the initrd, symlink /tmp to
/var/tmp to save a second tmpfs mount.

Add /mnt to the initrd hierarchy, which may be used by the user to manually
mount filesystems.  (Suggested-by: zrj)

Summary of changes:
 etc/defaults/mkinitrd.conf | 4 +++-
 sbin/mkinitrd/mkinitrd.sh  | 9 +++--
 2 files changed, 10 insertions(+), 3 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/2c6b09fdbe57f3e43b56cb5e7d8fc589aa70c0b0


-- 
DragonFly BSD source repository


git: initrd: Make etc/motd more informative

2018-06-08 Thread Aaron LI


commit fa8f1016ba7a7a1aca1f77c6fa6b838fabdb774e
Author: Aaron LI 
Date:   Fri Jun 1 14:08:57 2018 +0800

initrd: Make etc/motd more informative

Provide more information about the rescue shell environment, such as how to
mount the real root partition and continue, the mined editor, and more on
network connections.

Summary of changes:
 share/initrd/etc/motd | 17 ++---
 1 file changed, 14 insertions(+), 3 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/fa8f1016ba7a7a1aca1f77c6fa6b838fabdb774e


-- 
DragonFly BSD source repository


git: mkinitrd(8): Use getopts instead of getopt(1) for command options

2018-06-08 Thread Aaron LI


commit e6d2b207c86b3715f2b17a04525b97d722da1a78
Author: Aaron LI 
Date:   Fri Jun 1 15:48:13 2018 +0800

mkinitrd(8): Use getopts instead of getopt(1) for command options

Use the shell built-in getopts to deal with command line options, which is
more easier to use and allows whitespace in the option values.

Summary of changes:
 sbin/mkinitrd/mkinitrd.sh | 51 ++-
 1 file changed, 37 insertions(+), 14 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/e6d2b207c86b3715f2b17a04525b97d722da1a78


-- 
DragonFly BSD source repository


git: etc/crontab: Do not set HOME; remove /etc from PATH

2018-06-08 Thread Aaron LI


commit be4f6be01c03e8cba9e937ca117d95a59f709343
Author: Aaron LI 
Date:   Fri Jun 1 12:49:41 2018 +0800

etc/crontab: Do not set HOME; remove /etc from PATH

Do not set the HOME environment variable (checked with FreeBSD).

Remove "/etc" from PATH (checked with OpenBSD).

Summary of changes:
 etc/crontab | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/be4f6be01c03e8cba9e937ca117d95a59f709343


-- 
DragonFly BSD source repository


git: README: Update descriptions to sys/config files

2018-06-08 Thread Aaron LI


commit 6dfa5e2f7c6d51dd446334a68b911d0f0c0a53d7
Author: Aaron LI 
Date:   Fri Jun 1 12:47:58 2018 +0800

README: Update descriptions to sys/config files

Summary of changes:
 README | 14 +++---
 1 file changed, 7 insertions(+), 7 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/6dfa5e2f7c6d51dd446334a68b911d0f0c0a53d7


-- 
DragonFly BSD source repository


git: README: Remove the secure entry; add the doc entry.

2018-06-08 Thread Aaron LI


commit b224b70ed7e311123db802d9e76505c70566e9a1
Author: Aaron LI 
Date:   Fri Jun 1 12:46:21 2018 +0800

README: Remove the secure entry; add the doc entry.

Those contents resided under secure were merged into crypto some time ago.

Summary of changes:
 README | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/b224b70ed7e311123db802d9e76505c70566e9a1


-- 
DragonFly BSD source repository