Skip to content

Commit

Permalink
Problem: out of date with zproject
Browse files Browse the repository at this point in the history
Solution: regenerate
  • Loading branch information
bluca committed Apr 15, 2022
1 parent 0ba6e3a commit 6689f27
Show file tree
Hide file tree
Showing 11 changed files with 116 additions and 72 deletions.
28 changes: 28 additions & 0 deletions .obs/workflows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
pull_request:
steps:
- branch_package:
source_project: network:messaging:zeromq:git-draft
source_package: czmq
target_project: network:messaging:zeromq:ci
filters:
event: pull_request
merge:
steps:
- trigger_services:
project: network:messaging:zeromq:git-stable
package: czmq
filters:
event: push
branches:
only:
- master
release:
steps:
- trigger_services:
project: network:messaging:zeromq:release-stable
package: czmq
- trigger_services:
project: network:messaging:zeromq:release-draft
package: czmq
filters:
event: tag_push
3 changes: 2 additions & 1 deletion bindings/python_cffi/czmq_cffi/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ def dropILl (string):
def _dropILl (string):
if string.startswith (b"-I") or string.startswith (b"-L") or string.startswith (b"-l"):
return string [2:]
return [_dropILl (x) for x in string.split ()]
return string
return [_dropILl (x) for x in string.split () if x != b"-isystem"]

# convert -Dfoo=bar to list of tuples [("foo", "bar")] expected by cffi
def macros (string):
Expand Down
24 changes: 18 additions & 6 deletions include/zarmour.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,24 @@ extern "C" {
// @interface
// This is a stable class, and may not change except for emergencies. It
// is provided in stable builds.
#define ZARMOUR_MODE_BASE64_STD 0 // Standard base 64
#define ZARMOUR_MODE_BASE64_URL 1 // URL and filename friendly base 64
#define ZARMOUR_MODE_BASE32_STD 2 // Standard base 32
#define ZARMOUR_MODE_BASE32_HEX 3 // Extended hex base 32
#define ZARMOUR_MODE_BASE16 4 // Standard base 16
#define ZARMOUR_MODE_Z85 5 // Z85 from ZeroMQ RFC 32

// Standard base 64
#define ZARMOUR_MODE_BASE64_STD 0

// URL and filename friendly base 64
#define ZARMOUR_MODE_BASE64_URL 1

// Standard base 32
#define ZARMOUR_MODE_BASE32_STD 2

// Extended hex base 32
#define ZARMOUR_MODE_BASE32_HEX 3

// Standard base 16
#define ZARMOUR_MODE_BASE16 4

// Z85 from ZeroMQ RFC 32
#define ZARMOUR_MODE_Z85 5

// Create a new zarmour
CZMQ_EXPORT zarmour_t *
Expand Down
8 changes: 6 additions & 2 deletions include/zdir_patch.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,12 @@ extern "C" {
// @interface
// This is a stable class, and may not change except for emergencies. It
// is provided in stable builds.
#define ZDIR_PATCH_CREATE 1 // Creates a new file
#define ZDIR_PATCH_DELETE 2 // Delete a file

// Creates a new file
#define ZDIR_PATCH_CREATE 1

// Delete a file
#define ZDIR_PATCH_DELETE 2

// Create new patch
CZMQ_EXPORT zdir_patch_t *
Expand Down
9 changes: 6 additions & 3 deletions include/zframe.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,12 @@ extern "C" {
// is provided in stable builds.
// This class has draft methods, which may change over time. They are not
// in stable releases, by default. Use --enable-drafts to enable.
#define ZFRAME_MORE 1 //
#define ZFRAME_REUSE 2 //
#define ZFRAME_DONTWAIT 4 //

#define ZFRAME_MORE 1

#define ZFRAME_REUSE 2

#define ZFRAME_DONTWAIT 4

// Create a new frame. If size is not null, allocates the frame data
// to the specified size. If additionally, data is not null, copies
Expand Down
15 changes: 2 additions & 13 deletions packaging/debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,8 @@ Build-Depends: debhelper (>= 9),
libcurl4-nss-dev (>= 7.28.0),
libnss3-dev,
libmicrohttpd-dev,
dh-python,
python-all-dev, python-cffi, python-setuptools,
python3-all-dev, python3-cffi, python3-setuptools,
dh-python <!nopython>,
python3-all-dev <!nopython>, python3-cffi <!nopython>, python3-setuptools <!nopython>,
asciidoc-base | asciidoc, xmlto,
dh-autoreconf

Expand Down Expand Up @@ -71,16 +70,6 @@ Description: czmq debugging symbols
This package contains the debugging symbols for czmq:
the high-level c binding for 0mq.

Package: python-czmq-cffi
Architecture: any
Section: python
Depends:
libczmq4 (= ${binary:Version}),
${misc:Depends}, ${shlibs:Depends},
${python:Depends}, python-cffi,
Description: Python CFFI bindings for czmq
This package contains Python CFFI bindings for czmq.

Package: python3-czmq-cffi
Architecture: any
Section: python
Expand Down
5 changes: 2 additions & 3 deletions packaging/debian/czmq.dsc.obs → packaging/debian/czmq.dsc
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,8 @@ Build-Depends: debhelper (>= 9),
libcurl4-nss-dev (>= 7.28.0),
libnss3-dev,
libmicrohttpd-dev,
dh-python,
python-all-dev, python-cffi, python-setuptools,
python3-all-dev, python3-cffi, python3-setuptools,
dh-python <!nopython>,
python3-all-dev <!nopython>, python3-cffi <!nopython>, python3-setuptools <!nopython>,
asciidoc-base | asciidoc, xmlto,
dh-autoreconf

Expand Down
22 changes: 14 additions & 8 deletions packaging/debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ ifneq ("$(wildcard $(OBS_BUILD_CFG))","")
ifneq ("$(shell grep drafts $(OBS_BUILD_CFG))","")
DRAFTS=yes
endif
ifneq ("$(shell grep python_cffi $(OBS_BUILD_CFG))","")
ifneq ("$(shell grep python3_cffi $(OBS_BUILD_CFG))","")
PYTHON_CFFI=yes
endif
endif
Expand All @@ -38,7 +38,7 @@ ifneq (,$(findstring python_cffi,$(DEB_BUILD_OPTIONS)))
ifeq (,$(findstring nopython,$(DEB_BUILD_OPTIONS)))
ifeq (,$(findstring nopython,$(DEB_BUILD_PROFILES)))
PYTHON_CFFI=yes
WITH_PYTHON = --with=python2,python3
WITH_PYTHON = --with=python3
endif
endif
endif
Expand All @@ -48,31 +48,37 @@ export PYBUILD_NAME=czmq-cffi
export PKG_CONFIG_PATH=$(CURDIR)/bindings/python_cffi:$PKG_CONFIG_PATH

override_dh_auto_build:
dh_auto_build
dh_auto_build -O--buildsystem=autoconf
# Problem: we need pkg-config points to built and not yet installed copy of czmq
# Solution: chicken-egg problem - let's make "fake" pkg-config file
sed -e "s@^libdir.*@libdir=$(CURDIR)/src/.libs@" -e "s@^includedir.*@includedir=$(CURDIR)/include@" src/libczmq.pc > bindings/python_cffi/libczmq.pc
dh_auto_build --sourcedirectory=bindings/python_cffi -O--buildsystem=pybuild

override_dh_auto_install:
dh_auto_install
dh_auto_install -O--buildsystem=autoconf
dh_auto_install --sourcedirectory=bindings/python_cffi -O--buildsystem=pybuild

override_dh_auto_clean:
dh_auto_clean
dh_auto_clean -O--buildsystem=autoconf
dh_auto_clean -O--buildsystem=pybuild
rm -f bindings/python_cffi/*.pc
rm -rf bindings/python_cffi/*.egg-info/
else
WITH_PYTHON =
# This tells debhelper to avoid building the python CFFI packages
DH_OPTIONS += -Npython-czmq-cffi
DH_OPTIONS += -Npython3-czmq-cffi
export DH_OPTIONS

override_dh_auto_build:
dh_auto_build -O--buildsystem=autoconf

override_dh_auto_install:
dh_auto_install -O--buildsystem=autoconf

override_dh_auto_clean:
dh_auto_clean -O--buildsystem=autoconf
endif

# Workaround for automake < 1.14 bug
$(shell dpkg --compare-versions `dpkg-query -W -f='$${Version}\n' automake` lt 1:1.14 && mkdir -p config)
$(shell test -f src/Makemodule-local.am || touch src/Makemodule-local.am)

override_dh_strip:
Expand Down
44 changes: 18 additions & 26 deletions packaging/obs/_service
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<services>
<service name="tar_scm">
<service name="obs_scm">
<param name="url">https://github.com/zeromq/czmq</param>
<param name="scm">git</param>
<!-- delete to build from latest master on each refresh -->
Expand All @@ -11,82 +11,74 @@
<param name="exclude">.git</param>
<param name="changesgenerate">enable</param>
<param name="filename">czmq</param>
<param name="extract">packaging/debian/czmq.dsc</param>
<param name="extract">packaging/redhat/czmq.spec</param>
</service>

<!-- extract redhat packaging -->
<service name="extract_file">
<param name="archive">*.tar</param>
<param name="files">*/packaging/redhat/czmq.spec</param>
<param name="outfilename">czmq.spec</param>
</service>
<service name="tar" mode="buildtime"/>

<!-- extract debian packaging -->
<service name="extract_file">
<param name="archive">*.tar</param>
<param name="files">*/packaging/debian/czmq.dsc.obs</param>
<param name="outfilename">czmq.dsc</param>
</service>
<service name="extract_file">
<service name="extract_file" mode="buildtime">
<param name="archive">*.tar</param>
<param name="files">*/packaging/debian/changelog</param>
<param name="files">*/packaging/debian/changelog</param>
<param name="outfilename">debian.changelog</param>
</service>
<service name="extract_file">
<service name="extract_file" mode="buildtime">
<param name="archive">*.tar</param>
<param name="files">*/packaging/debian/compat</param>
<param name="outfilename">debian.compat</param>
</service>
<service name="extract_file">
<service name="extract_file" mode="buildtime">
<param name="archive">*.tar</param>
<param name="files">*/packaging/debian/control</param>
<param name="outfilename">debian.control</param>
</service>
<service name="extract_file">
<service name="extract_file" mode="buildtime">
<param name="archive">*.tar</param>
<param name="files">*/packaging/debian/copyright</param>
<param name="outfilename">debian.copyright</param>
</service>
<service name="extract_file">
<service name="extract_file" mode="buildtime">
<param name="archive">*.tar</param>
<param name="files">*/packaging/debian/czmq.install</param>
<param name="outfilename">debian.czmq.install</param>
</service>
<service name="extract_file">
<service name="extract_file" mode="buildtime">
<param name="archive">*.tar</param>
<param name="files">*/packaging/debian/czmq.manpages</param>
<param name="outfilename">debian.czmq.manpages</param>
</service>
<service name="extract_file">
<service name="extract_file" mode="buildtime">
<param name="archive">*.tar</param>
<param name="files">*/packaging/debian/format</param>
<param name="outfilename">debian.format</param>
</service>
<service name="extract_file">
<service name="extract_file" mode="buildtime">
<param name="archive">*.tar</param>
<param name="files">*/packaging/debian/libczmq4.install</param>
<param name="outfilename">debian.libczmq4.install</param>
</service>
<service name="extract_file">
<service name="extract_file" mode="buildtime">
<param name="archive">*.tar</param>
<param name="files">*/packaging/debian/libczmq-dev.install</param>
<param name="outfilename">debian.libczmq-dev.install</param>
</service>
<service name="extract_file">
<service name="extract_file" mode="buildtime">
<param name="archive">*.tar</param>
<param name="files">*/packaging/debian/libczmq-dev.manpages</param>
<param name="outfilename">debian.libczmq-dev.manpages</param>
</service>
<service name="extract_file">
<service name="extract_file" mode="buildtime">
<param name="archive">*.tar</param>
<param name="files">*/packaging/debian/rules</param>
<param name="outfilename">debian.rules</param>
</service>

<service name="set_version">
<service name="set_version" mode="buildtime">
<param name="basename">czmq</param>
</service>

<service name="recompress">
<service name="recompress" mode="buildtime">
<param name="file">*.tar</param>
<param name="compression">gz</param>
</service>
Expand Down
15 changes: 10 additions & 5 deletions src/czmq_classes.h
Original file line number Diff line number Diff line change
Expand Up @@ -523,11 +523,16 @@ CZMQ_PRIVATE char *
zsys_zplprintf_error (const char *format, zconfig_t *args);

// *** Draft constants, defined for internal use only ***
#define ZGOSSIP_MSG_HELLO 1 //
#define ZGOSSIP_MSG_PUBLISH 2 //
#define ZGOSSIP_MSG_PING 3 //
#define ZGOSSIP_MSG_PONG 4 //
#define ZGOSSIP_MSG_INVALID 5 //

#define ZGOSSIP_MSG_HELLO 1

#define ZGOSSIP_MSG_PUBLISH 2

#define ZGOSSIP_MSG_PING 3

#define ZGOSSIP_MSG_PONG 4

#define ZGOSSIP_MSG_INVALID 5

// *** Draft method, defined for internal use only ***
// Create a new empty zgossip_msg
Expand Down
15 changes: 10 additions & 5 deletions src/zgossip_msg.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,16 @@ extern "C" {
// stable builds by default. If you use this in applications, please ask
// for it to be pushed to stable state. Use --enable-drafts to enable.
#ifdef CZMQ_BUILD_DRAFT_API
#define ZGOSSIP_MSG_HELLO 1 //
#define ZGOSSIP_MSG_PUBLISH 2 //
#define ZGOSSIP_MSG_PING 3 //
#define ZGOSSIP_MSG_PONG 4 //
#define ZGOSSIP_MSG_INVALID 5 //

#define ZGOSSIP_MSG_HELLO 1

#define ZGOSSIP_MSG_PUBLISH 2

#define ZGOSSIP_MSG_PING 3

#define ZGOSSIP_MSG_PONG 4

#define ZGOSSIP_MSG_INVALID 5

// *** Draft method, for development use, may change without warning ***
// Create a new empty zgossip_msg
Expand Down

0 comments on commit 6689f27

Please sign in to comment.