Skip to content

Commit

Permalink
Merge pull request #480 from citrus-it/merge
Browse files Browse the repository at this point in the history
36615968 move man related code from setup.py to its own Makefile
  • Loading branch information
oetiker authored May 31, 2024
2 parents 9ae1aa1 + 63ee5de commit 34bc55c
Show file tree
Hide file tree
Showing 13 changed files with 95 additions and 63 deletions.
6 changes: 3 additions & 3 deletions README.sync
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
The pkg5 components have been updated to the latest upstream solaris-ips
as of:

commit c7efe165236d9243c6bc6a9b0abd6042ad9c04a3
commit ea98f7c05e3fc1c8501a80f331128f3dd26ced31
Author: Jakub Kulik <[email protected]>
Date: Thu May 16 02:41:50 2024 -0700
Date: Tue May 28 04:40:57 2024 -0700

36591165 clean up packaging and pkgdepend bypasses
36615968 move man related code from setup.py to its own Makefile

-----------------------------------------------------------------------------

11 changes: 5 additions & 6 deletions src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#
# Copyright (c) 2007, 2019, Oracle and/or its affiliates. All rights reserved.
# Copyright 2016, OmniTI Computer Consulting, Inc. All rights reserved.
# Copyright 2022 OmniOS Community Edition (OmniOSce) Association.
# Copyright 2024 OmniOS Community Edition (OmniOSce) Association.
#

include Makefile.com
Expand All @@ -36,16 +36,15 @@ TESTRESULTS = $(PYVERSIONS:%=testresults/%)
REQUIREMENTS = requirements.txt

all := TARGET = all
build := TARGET = build
install := TARGET = install
clean := TARGET = clean
clobber := TARGET = clobber
check := TARGET = check
packages := TARGET = install
test := TARGET = test

SUBDIRS=brand util/mkcert po
SUBDIRS=brand util/mkcert man po

all: build $(SUBDIRS)
all: $(SUBDIRS)

build: $(PYVERSIONS)

Expand All @@ -71,7 +70,7 @@ fmt: FRC
_bandit: FRC
python$(PYVER) -mpip install --quiet --user --upgrade bandit

check: _bandit
check: _bandit $(SUBDIRS)
python$(PYVER) -m bandit -r -q -c tests/banditrc . \
-b tests/bandit-baseline.json

Expand Down
1 change: 1 addition & 0 deletions src/Makefile.com
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ ROOTETC = $(ROOT)/etc
ROOTETCZONES = $(ROOTETC)/zones
ROOTETCBRAND = $(ROOTETC)/brand
ROOTUSRLIB = $(ROOT)/usr/lib
ROOTUSRSHARE = $(ROOT)/usr/share
ROOTBRAND = $(ROOTUSRLIB)/brand
ROOTPKGLIB = $(ROOTUSRLIB)/pkg

Expand Down
2 changes: 2 additions & 0 deletions src/brand/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,7 @@ all clean clobber install: $(SUBDIRS)
$(SUBDIRS): FRC
@cd $@; pwd; $(MAKE) $(TARGET)

check:

FRC:

68 changes: 68 additions & 0 deletions src/man/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
#
# This file and its contents are supplied under the terms of the
# Common Development and Distribution License ("CDDL"), version 1.0.
# You may only use this file in accordance with the terms of version
# 1.0 of the CDDL.
#
# A full copy of the text of the CDDL should have accompanied this
# source. A copy of the CDDL is also available via the Internet at
# http://www.illumos.org/license/CDDL.
#

# Copyright 2024 OmniOS Community Edition (OmniOSce) Association.

include ../Makefile.com

ROOTUSRSHAREMAN = $(ROOTUSRSHARE)/man
MAN1DIR = $(ROOTUSRSHAREMAN)/man1
MAN7DIR = $(ROOTUSRSHAREMAN)/man7
MAN8DIR = $(ROOTUSRSHAREMAN)/man8

MAN1 = \
pkg.1 \
pkgdepend.1 \
pkgdiff.1 \
pkgfmt.1 \
pkglint.1 \
pkgmerge.1 \
pkgmogrify.1 \
pkgrecv.1 \
pkgrepo.1 \
pkgsend.1 \
pkgsign.1 \
pkgsurf.1

MAN7 = \
bhyve.7 \
emu.7 \
illumos.7 \
ipkg.7 \
kvm.7 \
lipkg.7 \
lx.7 \
pkg.7 \
pkgsrc.7 \
sparse.7

MAN8 = \
pkg.depotd.8

all:

install: \
$(MAN1DIR) $(MAN7DIR) $(MAN8DIR) \
$(MAN1:%=$(MAN1DIR)/%) \
$(MAN7:%=$(MAN7DIR)/%) \
$(MAN8:%=$(MAN8DIR)/%)

check:
-mandoc -T lint $(MAN1) $(MAN7) $(MAN8) 2>&1 | \
egrep -v '(outdated mandoc.db|referenced manual not found)'

clean clobber:

$(MAN1DIR) $(MAN7DIR) $(MAN8DIR):
mkdir -p $@

$(MAN1DIR)/% $(MAN7DIR)/% $(MAN8DIR)/%: %
rm -f $@; $(INSTALL) -f $(@D) -m 0444 $<
3 changes: 2 additions & 1 deletion src/man/emu.7
Original file line number Diff line number Diff line change
Expand Up @@ -387,11 +387,12 @@ Disable the framebuffer.
This is the same as omitting the
.Ic vnc
attribute.
.It Cm unix Ns : Ns Ar path
.It Cm unix Ns \&: Ns Ar path
Sets up a VNC server on a UNIX socket at the specified
.Ar path .
Note that this path is relative to the zone root.
.El
.El
.Sh EXAMPLE
An example
.Em emu
Expand Down
2 changes: 1 addition & 1 deletion src/man/illumos.7
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
.Os
.Sh NAME
.Nm illumos
.Nd zone brand for running an independant illumos distribution.
.Nd zone brand for running an independant illumos distribution
.Sh DESCRIPTION
An
.Em illumos
Expand Down
3 changes: 2 additions & 1 deletion src/man/kvm.7
Original file line number Diff line number Diff line change
Expand Up @@ -198,11 +198,12 @@ Disable the framebuffer.
This is the same as omitting the
.Sy vnc
attribute.
.It Sy unix Ns : Ns Ar path
.It Sy unix Ns \&: Ns Ar path
Sets up a VNC server on a UNIX socket at the specified
.Ar path .
Note that this path is relative to the zone root.
.El
.El
.Sh EXAMPLE
An example
.Em kvm
Expand Down
15 changes: 8 additions & 7 deletions src/man/pkg.1
Original file line number Diff line number Diff line change
Expand Up @@ -1390,12 +1390,12 @@ man page for information about release and branch versions and about variants.
.Pp
The last column contains a set of flags that show the status of the package:
.Bl -tag -offset Ds -width Ds
.It \&In the Sy I No column.
.It \&In the Sy I No column .
.Bl -tag -offset Ds -width Ds
.It Sy i
The package is installed
.El
.It \&In the Sy F No column.
.It \&In the Sy F No column .
.Bl -tag -offset Ds -width Ds
.It Sy f
The package is frozen.
Expand All @@ -1405,7 +1405,7 @@ The package was manually installed.
.Pq with the Fl R No flag
The package is removable but is part of the default system software set.
.El
.It \&In the Sy O No column.
.It \&In the Sy O No column .
.Bl -tag -offset Ds -width Ds
.It Sy o
The package is obsolete.
Expand Down Expand Up @@ -3501,10 +3501,10 @@ section for some suggested values.
.It Cm %d
The publication date of the update being installed -
.Sy YYYY.MM.DD
.It Cm %D
.It Cm \&%D
The publication date of the update being installed -
.Sy IYYYYMMDD
.It Cm %r
.It Cm \&%r
The release being installed, without the leading
.Sy r -
e.g.
Expand Down Expand Up @@ -3594,7 +3594,8 @@ Always apply the default content update policy.
.It Cm always
Always download and update non-editable files that have changed.
.It Cm when-required
Download and update non-editable files that have changed only if the package system has determined that an update is required.
Download and update non-editable files that have changed only if the package
system has determined that an update is required.
.El
.Pp
Default value:
Expand Down Expand Up @@ -4281,7 +4282,7 @@ For bloody releases, the release name does not change and so the
.Sy %r
token is not available.
The
.Sy %D
.Sy \&%D
token can be used to include the release date in the BE name:
.Bd -literal
$ pkg set-property auto-be-name bloody_%D
Expand Down
4 changes: 2 additions & 2 deletions src/man/pkg.7
Original file line number Diff line number Diff line change
Expand Up @@ -1767,9 +1767,9 @@ to
By default, all facets are considered to be set to
.Sy true
in the image except for those that begin with
.Sq Sy facet.debug.
.Sq Sy facet.debug\&.
or
.Sq Sy facet.optional. .
.Sq Sy facet.optional\&. .
.Pp
Facets can be either set locally within an image using the
.Sy pkg change-facet
Expand Down
2 changes: 1 addition & 1 deletion src/man/pkg.depotd.8
Original file line number Diff line number Diff line change
Expand Up @@ -518,7 +518,7 @@ An unanticipated exception occurred.
svcadm enable application/pkg/server
.Ed
.Pp
.Sy Example 2 No Changing the Listening Port of the Server.
.Sy Example 2 No Changing the Listening Port of the Server
.Bd -literal -offset 4n
svccfg -s application/pkg/server setprop pkg/port = 10000
svcadm refresh application/pkg/server
Expand Down
1 change: 0 additions & 1 deletion src/man/pkgfmt.1
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,6 @@ An unanticipated exception occurred.
.El
.Sh ENVIRONMENT VARIABLES
The following environment variable is supported:
.Pp
.Bl -tag -width Ds
.It Ev PKGFMT_OUTPUT
The default output format,
Expand Down
40 changes: 0 additions & 40 deletions src/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,10 +122,6 @@
svc_method_dir = "lib/svc/method"
svc_share_dir = "lib/svc/share"

man1_dir = "usr/share/man/man1"
man8_dir = "usr/share/man/man8"
man7_dir = "usr/share/man/man7"

ignored_deps_dir = "usr/share/pkg/ignored_deps"
resource_dir = "usr/share/lib/pkg"
transform_dir = "usr/share/pkg/transforms"
Expand Down Expand Up @@ -228,38 +224,6 @@
"unknown": scripts_sunos,
}

man1_files = [
"man/pkg.1",
"man/pkgdepend.1",
"man/pkgdiff.1",
"man/pkgfmt.1",
"man/pkglint.1",
"man/pkgmerge.1",
"man/pkgmogrify.1",
"man/pkgsend.1",
"man/pkgsign.1",
"man/pkgsurf.1",
"man/pkgrecv.1",
"man/pkgrepo.1",
]
man8_files = [
"man/pkg.depotd.8",
#'man/pkg.depot-config.8',
#'man/pkg.sysrepo.8'
]
man7_files = [
"man/bhyve.7",
"man/emu.7",
"man/illumos.7",
"man/ipkg.7",
"man/kvm.7",
"man/lipkg.7",
"man/lx.7",
"man/pkgsrc.7",
"man/pkg.7",
"man/sparse.7",
]

packages = [
"pkg",
"pkg.actions",
Expand Down Expand Up @@ -1406,11 +1370,7 @@ def __init__(self, name, sources, build_64=False, **kwargs):
"installfile": installfile,
}

# all builds of IPS should have manpages
data_files += [
(man1_dir, man1_files),
(man8_dir, man8_files),
(man7_dir, man7_files),
(resource_dir, resource_files),
]
# add transforms
Expand Down

0 comments on commit 34bc55c

Please sign in to comment.