The Rambam · Sefer Zemanim
הלכות שבת כ״גSabbath 23
Chapter 23 of 30 in Sabbath — 28 halachot
Halacha 1א׳
הָעוֹשֶׂה נֶקֶב שֶׁהוּא עָשׂוּי לְהַכְנִיס וּלְהוֹצִיא כְּגוֹן נֶקֶב שֶׁבְּלוּל הַתַּרְנְגוֹלִין שֶׁהוּא עָשׂוּי לְהַכְנִיס הָאוֹרָה וּלְהוֹצִיא הַהֶבֶל הֲרֵי זֶה חַיָּב מִשּׁוּם מַכֶּה בְּפַטִּישׁ. לְפִיכָךְ גָּזְרוּ עַל כָּל נֶקֶב אֲפִלּוּ הָיָה עָשׂוּי לְהוֹצִיא בִּלְבַד אוֹ לְהַכְנִיס בִּלְבַד שֶׁמָּא יָבוֹא לַעֲשׂוֹת נֶקֶב שֶׁחַיָּבִין עָלָיו. וּמִפְּנֵי זֶה אֵין נוֹקְבִין בְּחָבִית נֶקֶב חָדָשׁ וְאֵין מוֹסִיפִין בּוֹ. אֲבָל פּוֹתְחִין נֶקֶב יָשָׁן. וְהוּא שֶׁלֹּא יִהְיֶה הַנֶּקֶב לְמַטָּה מִן הַשְּׁמָרִים שֶׁאִם הָיָה לְמַטָּה מִן הַשְּׁמָרִים הֲרֵי זֶה עָשׂוּי לְחַזֵּק וְאָסוּר לְפָתְחוֹ:
One who makes a hole that is made for putting things in and taking things out—such as a hole in a chicken coop, which is made to bring in light and take out vapor—is surely liable on account of "striking with a hammer." Hence, [the Sages] decreed about any hole—even if it was made to only take out or only bring in—lest he come to making a hole for which we are liable. And because of this, we do not make a new hole in a barrel nor do we add to it. And that is when the hole is not below the sediment. For if it is below the sediment, it is surely given to strengthening [such that it is like a new hole]; so it is forbidden to open it [even if it is old].
Halacha 2ב׳
נוֹקְבִין מְגוּפָה שֶׁל חָבִית לְהוֹצִיא מִמֶּנָּה יַיִן וּבִלְבַד שֶׁיְּנַקְּבֶנָּהּ מִלְּמַעְלָה אֲבָל מִצִּדָּהּ אָסוּר מִפְּנֵי שֶׁהוּא כִּמְתַקֵּן כְּלִי. שׁוֹבֵר אָדָם אֶת הֶחָבִית לֶאֱכל מִמֶּנָּה גְּרוֹגָרוֹת וּבִלְבַד שֶׁלֹּא יִתְכַּוֵּן לַעֲשׂוֹת כְּלִי. וּמֵבִיא אָדָם חָבִית שֶׁל יַיִן וּמַתִּיז אֶת רֹאשָׁהּ בְּסַיִף לִפְנֵי הָאוֹרְחִין וְאֵינוֹ חוֹשֵׁשׁ. שֶׁאֵין כַּוָּנָתוֹ אֶלָּא לְהַרְאוֹת נְדִיבַת לִבּוֹ:
We may perforate the plug of a barrel to extract wine from it, so long as one perforates it from on top. But it is forbidden [to do so] from its side, since it is like repairing a vessel. One may break a barrel on Shabbat in order to eat dried figs from it, so long as he does not intend to make a vessel. And one may bring a barrel of wine and chop off its top with a sword in front of the guests; and he need not be concerned. For his intention was only to show his generosity.
Halacha 3ג׳
וּכְשֵׁם שֶׁאָסוּר לִפְתֹּחַ כָּל נֶקֶב כָּךְ אָסוּר לִסְתֹּם כָּל נֶקֶב. לְפִיכָךְ אָסוּר לִסְתֹּם נֶקֶב הֶחָבִית וַאֲפִלּוּ בְּדָבָר שֶׁאֵינוֹ מִתְמָרֵחַ וְאֵינוֹ בָּא לִידֵי סְחִיטָה כְּגוֹן שֶׁיִּסְתֹּם בְּקֵיסָם אוֹ בִּצְרוֹר קָטָן. אֲבָל אִם הִנִּיחַ שָׁם אֹכֶל כְּדֵי לְהַצְנִיעוֹ וְנִמְצָא הַנֶּקֶב נִסְתָּם מֻתָּר. וּמֻתָּר לְהַעֲרִים בְּדָבָר זֶה:
And in the same way as it is forbidden to open a hole, so too is it forbidden to stop up any hole. Hence it is forbidden to seal the hole of a barrel, even with something that does not spread—such that one will not come to squeezing—such as if he stops it up with a twig or a small pebble. But if he places food there to store it and the hole becomes closed, it is permissible. And it is permissible to act craftily in this matter.
Mishneh Torah, Torat Emet 363 edition, via Sefaria — public domain
English: Sefaria Edition, tr. R. Francis Nataf, 2019 — CC BY