-
Notifications
You must be signed in to change notification settings - Fork 0
Creating This Repo: Why and How
This is a fork of python-ldap from GitHub (which will be referred to as upstream.) Code here is identical to upstream except SASL dependencies have been removed from the build process.
This repo is simply a mirror of python-ldap that can be built without SASL support for webqueue2's API
This repo is not a place to modify python-ldap code or add new features.
This repo was made by creating an empty repository with a default origin remote then adding an upstream remote and merging from upstream into origin. Assuming you've already configured global git credentials, the steps to reproduce this repository are as follows:
- Initialize an empty repo:
mkdir python-ldap
cd python-ldap
git init -b master
- Add default origin remote:
git remote add origin git@github.itap.purdue.edu:ECN/python-ldap.git
- Add upstream remote:
git remote add upstream https://github.com/python-ldap/python-ldap.git
# Confirm the remotes have been added and named properly
git remote -v
# Expected Output:
origin git@github.itap.purdue.edu:ECN/python-ldap.git (fetch)
origin git@github.itap.purdue.edu:ECN/python-ldap.git (push)
upstream https://github.com/python-ldap/python-ldap.git (fetch)
upstream https://github.com/python-ldap/python-ldap.git (push)
- Merge upstream into origin:
# The --allow-unrelated-histories flag is required because the the repo we
# made and the repo we are pulling from are unaware of each other.
git pull upstream master --allow-unrelated-histories
- Remove SASL requirements from build system:
This is the most important step.
In the setup.cfg
file, change the following:
[_ldap]
# Define extra include and library dirs if needed. distutils adds non
# standard library_dirs as rpath.
# library_dirs = /usr/lib /usr/lib64 /usr/local/lib /usr/local/lib64
# include_dirs = /usr/include /usr/local/include
# These defines needs OpenLDAP built with
- # ./configure --with-cyrus-sasl --with-tls
- defines = HAVE_SASL HAVE_TLS HAVE_LIBLDAP_R
+ # ./configure --with-tls
+ defines = HAVE_TLS HAVE_LIBLDAP_R
- Commit changes and push:
git add *
git commit
git push
- Create a tagged release:
See Configuring a remote for a fork - GitHub Docs. The following settings were used to match python-ldap at time of creation:
Setting | Value |
---|---|
Tag Version | python-ldap-3.3.1 |
Target | master |
Release Title | 3.3.1 |
Release Description | The initial release to support building without SASL support. |
At this point you should have a self-hosted copy of the python-ldap repository from GitHub than can be built without SASL support.